* [PATCH v4 02/10] ARM: SoC: Add per SoC SMP and CPU hotplug operations
From: Marc Zyngier @ 2011-10-03 17:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317663356-5114-1-git-send-email-marc.zyngier@arm.com>
Populate the SoC descriptor structure with the SMP and CPU hotplug
operations. To allow the kernel to continue building, the platform
hooks are defined as weak symbols which are overrided by the
platform code. Once all platforms are converted, the "weak" attribute
will be removed and the function made static.
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/include/asm/soc.h | 48 ++++++++++++++++++++++++++++++++++++++++++-
arch/arm/kernel/setup.c | 29 ++++++++++++++++++++++---
arch/arm/kernel/smp.c | 47 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 118 insertions(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/soc.h b/arch/arm/include/asm/soc.h
index ce92784..f1dd657 100644
--- a/arch/arm/include/asm/soc.h
+++ b/arch/arm/include/asm/soc.h
@@ -12,10 +12,54 @@
#ifndef __ASM_ARM_SOC_H
#define __ASM_ARM_SOC_H
+struct task_struct;
+
+struct arm_soc_smp_init_ops {
+ /*
+ * Setup the set of possible CPUs (via set_cpu_possible)
+ */
+ void (*smp_init_cpus)(void);
+ /*
+ * Initialize cpu_possible map, and enable coherency
+ */
+ void (*smp_prepare_cpus)(unsigned int max_cpus);
+};
+
+struct arm_soc_smp_ops {
+ /*
+ * Perform platform specific initialisation of the specified CPU.
+ */
+ void (*smp_secondary_init)(unsigned int cpu);
+ /*
+ * Boot a secondary CPU, and assign it the specified idle task.
+ * This also gives us the initial stack to use for this CPU.
+ */
+ int (*smp_boot_secondary)(unsigned int cpu, struct task_struct *idle);
+#ifdef CONFIG_HOTPLUG_CPU
+ int (*cpu_kill)(unsigned int cpu);
+ void (*cpu_die)(unsigned int cpu);
+ int (*cpu_disable)(unsigned int cpu);
+#endif
+};
+
struct arm_soc_desc {
- const char *name;
+ const char *name;
+#ifdef CONFIG_SMP
+ struct arm_soc_smp_init_ops *smp_init_ops;
+ struct arm_soc_smp_ops *smp_ops;
+#endif
};
-extern const struct arm_soc_desc *soc_desc;
+#ifdef CONFIG_SMP
+#define soc_smp_init_ops(ops) .smp_init_ops = &(ops),
+#define soc_smp_ops(ops) .smp_ops = &(ops),
+#else
+#define soc_smp_init_ops(ops) /* empty */
+#define soc_smp_ops(ops) /* empty */
+#endif
+
+extern const struct arm_soc_desc *soc_desc;
+extern const struct arm_soc_smp_init_ops *soc_smp_init_ops;
+extern const struct arm_soc_smp_ops *soc_smp_ops;
#endif /* __ASM_ARM_SOC_H */
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 34ffb2e..351ae18 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -141,8 +141,12 @@ static const char *cpu_name;
static const char *machine_name;
static char __initdata cmd_line[COMMAND_LINE_SIZE];
struct machine_desc *machine_desc __initdata;
-const struct arm_soc_desc *soc_desc;
-static struct arm_soc_desc __soc_desc __read_mostly;
+const struct arm_soc_desc *soc_desc __initdata;
+#ifdef CONFIG_SMP
+const struct arm_soc_smp_init_ops *soc_smp_init_ops __initdata;
+const struct arm_soc_smp_ops *soc_smp_ops __cpuinitdata;
+static struct arm_soc_smp_ops __soc_smp_ops __cpuinitdata;
+#endif
static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } };
@@ -917,11 +921,28 @@ void __init setup_arch(char **cmdline_p)
machine_desc = mdesc;
machine_name = mdesc->name;
if (mdesc->soc) {
- __soc_desc = *mdesc->soc;
- soc_desc = &__soc_desc;
+ soc_desc = mdesc->soc;
pr_info("SoC: %s\n", soc_desc->name);
} else
soc_desc = NULL;
+#ifdef CONFIG_SMP
+ if (soc_desc && soc_desc->smp_init_ops)
+ soc_smp_init_ops = soc_desc->smp_init_ops;
+ else
+ soc_smp_ops = NULL;
+
+ /*
+ * Warning: we're copying an __initdata structure into a
+ * __cpuinitdata structure. We *know* it is valid because only
+ * __cpuinit (or more persistant) functions should be pointed
+ * to by soc_smp_ops. Still, this is borderline ugly.
+ */
+ if (soc_desc && soc_desc->smp_ops) {
+ __soc_smp_ops = *soc_desc->smp_ops;
+ soc_smp_ops = &__soc_smp_ops;
+ } else
+ soc_smp_ops = NULL;
+#endif
if (mdesc->soft_reboot)
reboot_setup("s");
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 8bb30c2..e08d2e8 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -28,6 +28,7 @@
#include <linux/completion.h>
#include <linux/atomic.h>
+#include <asm/soc.h>
#include <asm/cacheflush.h>
#include <asm/cpu.h>
#include <asm/cputype.h>
@@ -155,9 +156,55 @@ int __cpuinit __cpu_up(unsigned int cpu)
return ret;
}
+/* SoC helpers */
+void __attribute__((weak)) __init smp_init_cpus(void)
+{
+ if (soc_smp_init_ops && soc_smp_init_ops->smp_init_cpus)
+ soc_smp_init_ops->smp_init_cpus();
+}
+
+void __attribute__((weak)) __init platform_smp_prepare_cpus(unsigned int max_cpus)
+{
+ if (soc_smp_ops && soc_smp_init_ops->smp_prepare_cpus)
+ soc_smp_init_ops->smp_prepare_cpus(max_cpus);
+}
+
+void __attribute__((weak)) __cpuinit platform_secondary_init(unsigned int cpu)
+{
+ if (soc_smp_ops && soc_smp_ops->smp_secondary_init)
+ soc_smp_ops->smp_secondary_init(cpu);
+}
+
+int __attribute__((weak)) __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+{
+ if (soc_smp_ops && soc_smp_ops->smp_boot_secondary)
+ return soc_smp_ops->smp_boot_secondary(cpu, idle);
+ return -ENOSYS;
+}
+
#ifdef CONFIG_HOTPLUG_CPU
static void percpu_timer_stop(void);
+int __attribute__((weak)) __cpuinit platform_cpu_kill(unsigned int cpu)
+{
+ if (soc_smp_ops && soc_smp_ops->cpu_kill)
+ return soc_smp_ops->cpu_kill(cpu);
+ return 0;
+}
+
+void __attribute__((weak)) __cpuinit platform_cpu_die(unsigned int cpu)
+{
+ if (soc_smp_ops && soc_smp_ops->cpu_die)
+ soc_smp_ops->cpu_die(cpu);
+}
+
+int __attribute__((weak)) __cpuinit platform_cpu_disable(unsigned int cpu)
+{
+ if (soc_smp_ops && soc_smp_ops->cpu_disable)
+ return soc_smp_ops->cpu_disable(cpu);
+ return -EPERM;
+}
+
/*
* __cpu_disable runs on the processor to be shutdown.
*/
--
1.7.0.4
^ permalink raw reply related
* [PATCH v4 03/10] ARM: SoC: convert VExpress/RealView to SoC descriptor
From: Marc Zyngier @ 2011-10-03 17:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317663356-5114-1-git-send-email-marc.zyngier@arm.com>
Convert both Realview and VExpress to use the SoC descriptor to
provide their SMP and CPU hotplug operation.
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/mach-realview/core.c | 7 +++++++
arch/arm/mach-realview/core.h | 9 +++++++++
arch/arm/mach-realview/hotplug.c | 6 +++---
arch/arm/mach-realview/platsmp.c | 24 ++++++++++++++++++++----
arch/arm/mach-realview/realview_eb.c | 1 +
arch/arm/mach-realview/realview_pb1176.c | 1 +
arch/arm/mach-realview/realview_pb11mp.c | 1 +
arch/arm/mach-realview/realview_pba8.c | 1 +
arch/arm/mach-realview/realview_pbx.c | 1 +
arch/arm/mach-vexpress/core.h | 10 ++++++++++
arch/arm/mach-vexpress/hotplug.c | 6 +++---
arch/arm/mach-vexpress/platsmp.c | 24 ++++++++++++++++++++----
arch/arm/mach-vexpress/v2m.c | 9 +++++++++
arch/arm/plat-versatile/include/plat/platsmp.h | 14 ++++++++++++++
arch/arm/plat-versatile/platsmp.c | 4 ++--
15 files changed, 102 insertions(+), 16 deletions(-)
create mode 100644 arch/arm/plat-versatile/include/plat/platsmp.h
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index d5ed5d4..e84e6b2 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -33,6 +33,7 @@
#include <linux/clkdev.h>
#include <linux/mtd/physmap.h>
+#include <asm/soc.h>
#include <asm/system.h>
#include <mach/hardware.h>
#include <asm/irq.h>
@@ -533,3 +534,9 @@ void realview_fixup(struct tag *tags, char **from, struct meminfo *meminfo)
meminfo->nr_banks = 1;
#endif
}
+
+struct arm_soc_desc realview_soc_desc __initdata = {
+ .name = "ARM RealView Platform",
+ soc_smp_init_ops(realview_soc_smp_init_ops)
+ soc_smp_ops(realview_soc_smp_ops)
+};
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 47259c8..a262e4e 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -27,6 +27,7 @@
#include <asm/setup.h>
#include <asm/leds.h>
+#include <asm/soc.h>
#define AMBA_DEVICE(name,busid,base,plat) \
static struct amba_device name##_device = { \
@@ -67,4 +68,12 @@ extern void realview_fixup(struct tag *tags, char **from,
struct meminfo *meminfo);
extern void (*realview_reset)(char);
+extern struct arm_soc_desc realview_soc_desc;
+extern struct arm_soc_smp_init_ops realview_soc_smp_init_ops;
+extern struct arm_soc_smp_ops realview_soc_smp_ops;
+
+extern int realview_cpu_kill(unsigned int cpu);
+extern void realview_cpu_die(unsigned int cpu);
+extern int realview_cpu_disable(unsigned int cpu);
+
#endif
diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c
index ac1aed2..c8adf5c 100644
--- a/arch/arm/mach-realview/hotplug.c
+++ b/arch/arm/mach-realview/hotplug.c
@@ -87,7 +87,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
}
}
-int platform_cpu_kill(unsigned int cpu)
+int realview_cpu_kill(unsigned int cpu)
{
return 1;
}
@@ -97,7 +97,7 @@ int platform_cpu_kill(unsigned int cpu)
*
* Called with IRQs disabled
*/
-void platform_cpu_die(unsigned int cpu)
+void realview_cpu_die(unsigned int cpu)
{
int spurious = 0;
@@ -117,7 +117,7 @@ void platform_cpu_die(unsigned int cpu)
pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
}
-int platform_cpu_disable(unsigned int cpu)
+int realview_cpu_disable(unsigned int cpu)
{
/*
* we don't allow CPU 0 to be shutdown (it is still too special
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index 4ae943b..92be3eb 100644
--- a/arch/arm/mach-realview/platsmp.c
+++ b/arch/arm/mach-realview/platsmp.c
@@ -18,14 +18,15 @@
#include <asm/mach-types.h>
#include <asm/smp_scu.h>
#include <asm/unified.h>
+#include <asm/soc.h>
#include <mach/board-eb.h>
#include <mach/board-pb11mp.h>
#include <mach/board-pbx.h>
-#include "core.h"
+#include <plat/platsmp.h>
-extern void versatile_secondary_startup(void);
+#include "core.h"
static void __iomem *scu_base_addr(void)
{
@@ -44,7 +45,7 @@ static void __iomem *scu_base_addr(void)
* Initialise the CPU possible map early - this describes the CPUs
* which may be present or become present in the system.
*/
-void __init smp_init_cpus(void)
+static void __init realview_smp_init_cpus(void)
{
void __iomem *scu_base = scu_base_addr();
unsigned int i, ncores;
@@ -66,7 +67,7 @@ void __init smp_init_cpus(void)
set_smp_cross_call(gic_raise_softirq);
}
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
{
scu_enable(scu_base_addr());
@@ -80,3 +81,18 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
__raw_writel(BSYM(virt_to_phys(versatile_secondary_startup)),
__io_address(REALVIEW_SYS_FLAGSSET));
}
+
+struct arm_soc_smp_init_ops realview_soc_smp_init_ops __initdata = {
+ .smp_init_cpus = realview_smp_init_cpus,
+ .smp_prepare_cpus = realview_smp_prepare_cpus,
+};
+
+struct arm_soc_smp_ops realview_soc_smp_ops __initdata = {
+ .smp_secondary_init = versatile_secondary_init,
+ .smp_boot_secondary = versatile_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_kill = realview_cpu_kill,
+ .cpu_die = realview_cpu_die,
+ .cpu_disable = realview_cpu_disable,
+#endif
+};
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 026c66a..427e44e 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -464,6 +464,7 @@ static void __init realview_eb_init(void)
MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
.atag_offset = 0x100,
+ .soc = &realview_soc_desc,
.fixup = realview_fixup,
.map_io = realview_eb_map_io,
.init_early = realview_init_early,
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index 7ead14f..99ea1c0 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -358,6 +358,7 @@ static void __init realview_pb1176_init(void)
MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
.atag_offset = 0x100,
+ .soc = &realview_soc_desc,
.fixup = realview_pb1176_fixup,
.map_io = realview_pb1176_map_io,
.init_early = realview_init_early,
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index 671ad6d..6cb8318 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -361,6 +361,7 @@ static void __init realview_pb11mp_init(void)
MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
.atag_offset = 0x100,
+ .soc = &realview_soc_desc,
.fixup = realview_fixup,
.map_io = realview_pb11mp_map_io,
.init_early = realview_init_early,
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index cbf22df..3db72c5 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -311,6 +311,7 @@ static void __init realview_pba8_init(void)
MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
.atag_offset = 0x100,
+ .soc = &realview_soc_desc,
.fixup = realview_fixup,
.map_io = realview_pba8_map_io,
.init_early = realview_init_early,
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 63c4114..bea4212 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -394,6 +394,7 @@ static void __init realview_pbx_init(void)
MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
.atag_offset = 0x100,
+ .soc = &realview_soc_desc,
.fixup = realview_pbx_fixup,
.map_io = realview_pbx_map_io,
.init_early = realview_init_early,
diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-vexpress/core.h
index f439715..bd9065a 100644
--- a/arch/arm/mach-vexpress/core.h
+++ b/arch/arm/mach-vexpress/core.h
@@ -17,3 +17,13 @@ struct amba_device name##_device = { \
.irq = IRQ_##base, \
/* .dma = DMA_##base,*/ \
}
+
+struct arm_soc_smp_init_ops;
+struct arm_soc_smp_ops;
+
+extern struct arm_soc_smp_init_ops vexpress_soc_smp_init_ops;
+extern struct arm_soc_smp_ops vexpress_soc_smp_ops;
+
+extern int vexpress_cpu_kill(unsigned int cpu);
+extern void vexpress_cpu_die(unsigned int cpu);
+extern int vexpress_cpu_disable(unsigned int cpu);
diff --git a/arch/arm/mach-vexpress/hotplug.c b/arch/arm/mach-vexpress/hotplug.c
index 813ee08..08e5e42 100644
--- a/arch/arm/mach-vexpress/hotplug.c
+++ b/arch/arm/mach-vexpress/hotplug.c
@@ -83,7 +83,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
}
}
-int platform_cpu_kill(unsigned int cpu)
+int vexpress_cpu_kill(unsigned int cpu)
{
return 1;
}
@@ -93,7 +93,7 @@ int platform_cpu_kill(unsigned int cpu)
*
* Called with IRQs disabled
*/
-void platform_cpu_die(unsigned int cpu)
+void vexpress_cpu_die(unsigned int cpu)
{
int spurious = 0;
@@ -113,7 +113,7 @@ void platform_cpu_die(unsigned int cpu)
pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
}
-int platform_cpu_disable(unsigned int cpu)
+int vexpress_cpu_disable(unsigned int cpu)
{
/*
* we don't allow CPU 0 to be shutdown (it is still too special
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c
index 2b5f7ac..523d226 100644
--- a/arch/arm/mach-vexpress/platsmp.c
+++ b/arch/arm/mach-vexpress/platsmp.c
@@ -13,25 +13,26 @@
#include <linux/smp.h>
#include <linux/io.h>
+#include <asm/soc.h>
#include <asm/unified.h>
#include <mach/motherboard.h>
#define V2M_PA_CS7 0x10000000
-#include "core.h"
+#include <plat/platsmp.h>
-extern void versatile_secondary_startup(void);
+#include "core.h"
/*
* Initialise the CPU possible map early - this describes the CPUs
* which may be present or become present in the system.
*/
-void __init smp_init_cpus(void)
+static void __init vexpress_smp_init_cpus(void)
{
ct_desc->init_cpu_map();
}
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init vexpress_smp_prepare_cpus(unsigned int max_cpus)
{
/*
* Initialise the present map, which describes the set of CPUs
@@ -49,3 +50,18 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
writel(BSYM(virt_to_phys(versatile_secondary_startup)),
MMIO_P2V(V2M_SYS_FLAGSSET));
}
+
+struct arm_soc_smp_init_ops vexpress_soc_smp_init_ops __initdata = {
+ .smp_init_cpus = vexpress_smp_init_cpus,
+ .smp_prepare_cpus = vexpress_smp_prepare_cpus,
+};
+
+struct arm_soc_smp_ops vexpress_soc_smp_ops __initdata = {
+ .smp_secondary_init = versatile_secondary_init,
+ .smp_boot_secondary = versatile_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_kill = vexpress_cpu_kill,
+ .cpu_die = vexpress_cpu_die,
+ .cpu_disable = vexpress_cpu_disable,
+#endif
+};
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 1fafc32..47bca2a 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -16,6 +16,7 @@
#include <linux/mtd/physmap.h>
#include <asm/mach-types.h>
+#include <asm/soc.h>
#include <asm/sizes.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -28,6 +29,7 @@
#include <mach/motherboard.h>
#include <plat/sched_clock.h>
+#include <plat/platsmp.h>
#include "core.h"
@@ -442,8 +444,15 @@ static void __init v2m_init(void)
ct_desc->init_tile();
}
+static struct arm_soc_desc vexpress_soc_desc __initdata = {
+ .name = "ARM VE Platform",
+ soc_smp_init_ops(vexpress_soc_smp_init_ops)
+ soc_smp_ops(vexpress_soc_smp_ops)
+};
+
MACHINE_START(VEXPRESS, "ARM-Versatile Express")
.atag_offset = 0x100,
+ .soc = &vexpress_soc_desc,
.map_io = v2m_map_io,
.init_early = v2m_init_early,
.init_irq = v2m_init_irq,
diff --git a/arch/arm/plat-versatile/include/plat/platsmp.h b/arch/arm/plat-versatile/include/plat/platsmp.h
new file mode 100644
index 0000000..50fb830
--- /dev/null
+++ b/arch/arm/plat-versatile/include/plat/platsmp.h
@@ -0,0 +1,14 @@
+/*
+ * linux/arch/arm/plat-versatile/include/plat/platsmp.h
+ *
+ * Copyright (C) 2011 ARM Ltd.
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+extern void versatile_secondary_startup(void);
+extern void versatile_secondary_init(unsigned int cpu);
+extern int versatile_boot_secondary(unsigned int cpu, struct task_struct *idle);
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c
index 92f18d3..d403022 100644
--- a/arch/arm/plat-versatile/platsmp.c
+++ b/arch/arm/plat-versatile/platsmp.c
@@ -39,7 +39,7 @@ static void __cpuinit write_pen_release(int val)
static DEFINE_SPINLOCK(boot_lock);
-void __cpuinit platform_secondary_init(unsigned int cpu)
+void __cpuinit versatile_secondary_init(unsigned int cpu)
{
/*
* if any interrupts are already enabled for the primary
@@ -61,7 +61,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
spin_unlock(&boot_lock);
}
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+int __cpuinit versatile_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
unsigned long timeout;
--
1.7.0.4
^ permalink raw reply related
* [PATCH v4 04/10] ARM: SoC: convert OMAP4 to SoC descriptor
From: Marc Zyngier @ 2011-10-03 17:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317663356-5114-1-git-send-email-marc.zyngier@arm.com>
Convert OMAP4 to use the SoC descriptor to provide its SMP
and CPU hotplug operations.
Tested on both Panda and IGEPv2 (MULTI_OMAP kernel)
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/mach-omap2/board-4430sdp.c | 1 +
arch/arm/mach-omap2/board-omap4panda.c | 1 +
arch/arm/mach-omap2/include/mach/omap4-common.h | 14 +++++++++++++
arch/arm/mach-omap2/omap-hotplug.c | 6 ++--
arch/arm/mach-omap2/omap-smp.c | 24 +++++++++++++++++++---
arch/arm/mach-omap2/omap4-common.c | 7 ++++++
6 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 4d0c8b9..c404c5b 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -986,6 +986,7 @@ static void __init omap_4430sdp_map_io(void)
MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
/* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
.atag_offset = 0x100,
+ .soc = &omap4_soc_desc,
.reserve = omap_reserve,
.map_io = omap_4430sdp_map_io,
.init_early = omap4430_init_early,
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 201c0c2..42d6168 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -579,6 +579,7 @@ static void __init omap4_panda_map_io(void)
MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
/* Maintainer: David Anders - Texas Instruments Inc */
.atag_offset = 0x100,
+ .soc = &omap4_soc_desc,
.reserve = omap_reserve,
.map_io = omap4_panda_map_io,
.init_early = omap4430_init_early,
diff --git a/arch/arm/mach-omap2/include/mach/omap4-common.h b/arch/arm/mach-omap2/include/mach/omap4-common.h
index e4bd876..1db7941 100644
--- a/arch/arm/mach-omap2/include/mach/omap4-common.h
+++ b/arch/arm/mach-omap2/include/mach/omap4-common.h
@@ -39,5 +39,19 @@ extern void omap_secondary_startup(void);
extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
extern void omap_auxcoreboot_addr(u32 cpu_addr);
extern u32 omap_read_auxcoreboot0(void);
+
+extern int omap4_cpu_kill(unsigned int cpu);
+extern void omap4_cpu_die(unsigned int cpu);
+extern int omap4_cpu_disable(unsigned int cpu);
+
+struct arm_soc_smp_init_ops;
+struct arm_soc_smp_ops;
+
+extern struct arm_soc_smp_init_ops omap4_soc_smp_init_ops;
+extern struct arm_soc_smp_ops omap4_soc_smp_ops;
#endif
+
+struct arm_soc_desc;
+extern struct arm_soc_desc omap4_soc_desc;
+
#endif
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
index 4976b93..40982c6 100644
--- a/arch/arm/mach-omap2/omap-hotplug.c
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -21,7 +21,7 @@
#include <asm/cacheflush.h>
#include <mach/omap4-common.h>
-int platform_cpu_kill(unsigned int cpu)
+int omap4_cpu_kill(unsigned int cpu)
{
return 1;
}
@@ -30,7 +30,7 @@ int platform_cpu_kill(unsigned int cpu)
* platform-specific code to shutdown a CPU
* Called with IRQs disabled
*/
-void platform_cpu_die(unsigned int cpu)
+void omap4_cpu_die(unsigned int cpu)
{
flush_cache_all();
dsb();
@@ -57,7 +57,7 @@ void platform_cpu_die(unsigned int cpu)
}
}
-int platform_cpu_disable(unsigned int cpu)
+int omap4_cpu_disable(unsigned int cpu)
{
/*
* we don't allow CPU 0 to be shutdown (it is still too special
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index ce65e93..061ed7f 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -23,6 +23,7 @@
#include <asm/cacheflush.h>
#include <asm/hardware/gic.h>
#include <asm/smp_scu.h>
+#include <asm/soc.h>
#include <mach/hardware.h>
#include <mach/omap4-common.h>
@@ -31,7 +32,7 @@ static void __iomem *scu_base;
static DEFINE_SPINLOCK(boot_lock);
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit omap4_secondary_init(unsigned int cpu)
{
/*
* If any interrupts are already enabled for the primary
@@ -47,7 +48,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
spin_unlock(&boot_lock);
}
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
/*
* Set synchronisation state between this boot processor
@@ -98,7 +99,7 @@ static void __init wakeup_secondary(void)
* Initialise the CPU possible map early - this describes the CPUs
* which may be present or become present in the system.
*/
-void __init smp_init_cpus(void)
+static void __init omap4_smp_init_cpus(void)
{
unsigned int i, ncores;
@@ -123,7 +124,7 @@ void __init smp_init_cpus(void)
set_smp_cross_call(gic_raise_softirq);
}
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
{
/*
@@ -133,3 +134,18 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
scu_enable(scu_base);
wakeup_secondary();
}
+
+struct arm_soc_smp_init_ops omap4_soc_smp_init_ops __initdata = {
+ .smp_init_cpus = omap4_smp_init_cpus,
+ .smp_prepare_cpus = omap4_smp_prepare_cpus,
+};
+
+struct arm_soc_smp_ops omap4_soc_smp_ops __initdata = {
+ .smp_secondary_init = omap4_secondary_init,
+ .smp_boot_secondary = omap4_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_kill = omap4_cpu_kill,
+ .cpu_die = omap4_cpu_die,
+ .cpu_disable = omap4_cpu_disable,
+#endif
+};
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 35ac3e5..de39fd4 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -16,6 +16,7 @@
#include <linux/io.h>
#include <linux/platform_device.h>
+#include <asm/soc.h>
#include <asm/hardware/gic.h>
#include <asm/hardware/cache-l2x0.h>
@@ -111,3 +112,9 @@ static int __init omap_l2_cache_init(void)
}
early_initcall(omap_l2_cache_init);
#endif
+
+struct arm_soc_desc omap4_soc_desc __initdata = {
+ .name = "TI OMAP4",
+ soc_smp_init_ops(omap4_soc_smp_init_ops)
+ soc_smp_ops(omap4_soc_smp_ops)
+};
--
1.7.0.4
^ permalink raw reply related
* [PATCH v4 05/10] ARM: SoC: convert Tegra to SoC descriptor
From: Marc Zyngier @ 2011-10-03 17:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317663356-5114-1-git-send-email-marc.zyngier@arm.com>
Convert Tegra to use the SoC descriptor to provide its SMP
and CPU hotplug operations.
Tested on Harmony.
Cc: Colin Cross <ccross@android.com>
Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/mach-tegra/board-dt.c | 2 ++
arch/arm/mach-tegra/board-harmony.c | 2 ++
arch/arm/mach-tegra/board-paz00.c | 2 ++
arch/arm/mach-tegra/board-seaboard.c | 4 ++++
arch/arm/mach-tegra/board-trimslice.c | 2 ++
arch/arm/mach-tegra/common.c | 8 ++++++++
arch/arm/mach-tegra/common.h | 11 +++++++++++
arch/arm/mach-tegra/hotplug.c | 6 +++---
arch/arm/mach-tegra/platsmp.c | 26 ++++++++++++++++++++++----
9 files changed, 56 insertions(+), 7 deletions(-)
create mode 100644 arch/arm/mach-tegra/common.h
diff --git a/arch/arm/mach-tegra/board-dt.c b/arch/arm/mach-tegra/board-dt.c
index 9f47e04..0b3f937 100644
--- a/arch/arm/mach-tegra/board-dt.c
+++ b/arch/arm/mach-tegra/board-dt.c
@@ -44,6 +44,7 @@
#include "board-harmony.h"
#include "clock.h"
#include "devices.h"
+#include "common.h"
void harmony_pinmux_init(void);
void seaboard_pinmux_init(void);
@@ -111,6 +112,7 @@ static const char * tegra_dt_board_compat[] = {
DT_MACHINE_START(TEGRA_DT, "nVidia Tegra (Flattened Device Tree)")
.map_io = tegra_map_common_io,
+ .soc = &tegra_soc_desc,
.init_early = tegra_init_early,
.init_irq = tegra_init_irq,
.timer = &tegra_timer,
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index f0bdc5e..f2ef94f 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -43,6 +43,7 @@
#include "clock.h"
#include "devices.h"
#include "gpio-names.h"
+#include "common.h"
static struct plat_serial8250_port debug_uart_platform_data[] = {
{
@@ -183,6 +184,7 @@ static void __init tegra_harmony_init(void)
MACHINE_START(HARMONY, "harmony")
.atag_offset = 0x100,
+ .soc = &tegra_soc_desc,
.fixup = tegra_harmony_fixup,
.map_io = tegra_map_common_io,
.init_early = tegra_init_early,
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 602f8dd..63595f0 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -43,6 +43,7 @@
#include "clock.h"
#include "devices.h"
#include "gpio-names.h"
+#include "common.h"
static struct plat_serial8250_port debug_uart_platform_data[] = {
{
@@ -186,6 +187,7 @@ static void __init tegra_paz00_init(void)
MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ")
.atag_offset = 0x100,
+ .soc = &tegra_soc_desc,
.fixup = tegra_paz00_fixup,
.map_io = tegra_map_common_io,
.init_early = tegra_init_early,
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
index bf13ea3..dfd9c95 100644
--- a/arch/arm/mach-tegra/board-seaboard.c
+++ b/arch/arm/mach-tegra/board-seaboard.c
@@ -40,6 +40,7 @@
#include "clock.h"
#include "devices.h"
#include "gpio-names.h"
+#include "common.h"
static struct plat_serial8250_port debug_uart_platform_data[] = {
{
@@ -281,6 +282,7 @@ static void __init tegra_wario_init(void)
MACHINE_START(SEABOARD, "seaboard")
.atag_offset = 0x100,
+ .soc = &tegra_soc_desc,
.map_io = tegra_map_common_io,
.init_early = tegra_init_early,
.init_irq = tegra_init_irq,
@@ -290,6 +292,7 @@ MACHINE_END
MACHINE_START(KAEN, "kaen")
.atag_offset = 0x100,
+ .soc = &tegra_soc_desc,
.map_io = tegra_map_common_io,
.init_early = tegra_init_early,
.init_irq = tegra_init_irq,
@@ -299,6 +302,7 @@ MACHINE_END
MACHINE_START(WARIO, "wario")
.atag_offset = 0x100,
+ .soc = &tegra_soc_desc,
.map_io = tegra_map_common_io,
.init_early = tegra_init_early,
.init_irq = tegra_init_irq,
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index e008c0e..16cfc39 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -38,6 +38,7 @@
#include "clock.h"
#include "devices.h"
#include "gpio-names.h"
+#include "common.h"
#include "board-trimslice.h"
@@ -173,6 +174,7 @@ static void __init tegra_trimslice_init(void)
MACHINE_START(TRIMSLICE, "trimslice")
.atag_offset = 0x100,
+ .soc = &tegra_soc_desc,
.fixup = tegra_trimslice_fixup,
.map_io = tegra_map_common_io,
.init_early = tegra_init_early,
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index d5e3f89..e9c5f9c 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -22,6 +22,7 @@
#include <linux/clk.h>
#include <linux/delay.h>
+#include <asm/soc.h>
#include <asm/hardware/cache-l2x0.h>
#include <mach/iomap.h>
@@ -30,6 +31,7 @@
#include "board.h"
#include "clock.h"
#include "fuse.h"
+#include "common.h"
void (*arch_reset)(char mode, const char *cmd) = tegra_assert_system_reset;
@@ -81,3 +83,9 @@ void __init tegra_init_early(void)
tegra_clk_init_from_table(common_clk_init_table);
tegra_init_cache();
}
+
+struct arm_soc_desc tegra_soc_desc __initdata = {
+ .name = "nVIDIA Tegra",
+ soc_smp_init_ops(tegra_soc_smp_init_ops)
+ soc_smp_ops(tegra_soc_smp_ops)
+};
diff --git a/arch/arm/mach-tegra/common.h b/arch/arm/mach-tegra/common.h
new file mode 100644
index 0000000..e4c214d
--- /dev/null
+++ b/arch/arm/mach-tegra/common.h
@@ -0,0 +1,11 @@
+struct arm_soc_desc;
+extern struct arm_soc_desc tegra_soc_desc;
+
+struct arm_soc_smp_init_ops;
+struct arm_soc_smp_ops;
+extern struct arm_soc_smp_init_ops tegra_soc_smp_init_ops;
+extern struct arm_soc_smp_ops tegra_soc_smp_ops;
+
+extern int tegra_cpu_kill(unsigned int cpu);
+extern void tegra_cpu_die(unsigned int cpu);
+extern int tegra_cpu_disable(unsigned int cpu);
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c
index f329404..7319f5f 100644
--- a/arch/arm/mach-tegra/hotplug.c
+++ b/arch/arm/mach-tegra/hotplug.c
@@ -86,7 +86,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
}
}
-int platform_cpu_kill(unsigned int cpu)
+int tegra_cpu_kill(unsigned int cpu)
{
return 1;
}
@@ -96,7 +96,7 @@ int platform_cpu_kill(unsigned int cpu)
*
* Called with IRQs disabled
*/
-void platform_cpu_die(unsigned int cpu)
+void tegra_cpu_die(unsigned int cpu)
{
int spurious = 0;
@@ -116,7 +116,7 @@ void platform_cpu_die(unsigned int cpu)
pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
}
-int platform_cpu_disable(unsigned int cpu)
+int tegra_cpu_disable(unsigned int cpu)
{
/*
* we don't allow CPU 0 to be shutdown (it is still too special
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 0886cbc..f18b07d 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -23,9 +23,12 @@
#include <asm/hardware/gic.h>
#include <asm/mach-types.h>
#include <asm/smp_scu.h>
+#include <asm/soc.h>
#include <mach/iomap.h>
+#include "common.h"
+
extern void tegra_secondary_startup(void);
static DEFINE_SPINLOCK(boot_lock);
@@ -38,7 +41,7 @@ static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE);
#define CLK_RST_CONTROLLER_RST_CPU_CMPLX_CLR \
(IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x344)
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit tegra_secondary_init(unsigned int cpu)
{
/*
* if any interrupts are already enabled for the primary
@@ -54,7 +57,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
spin_unlock(&boot_lock);
}
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit tegra_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
unsigned long old_boot_vector;
unsigned long boot_vector;
@@ -110,7 +113,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
* Initialise the CPU possible map early - this describes the CPUs
* which may be present or become present in the system.
*/
-void __init smp_init_cpus(void)
+static void __init tegra_smp_init_cpus(void)
{
unsigned int i, ncores = scu_get_core_count(scu_base);
@@ -126,8 +129,23 @@ void __init smp_init_cpus(void)
set_smp_cross_call(gic_raise_softirq);
}
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init tegra_smp_prepare_cpus(unsigned int max_cpus)
{
scu_enable(scu_base);
}
+
+struct arm_soc_smp_init_ops tegra_soc_smp_init_ops __initdata = {
+ .smp_init_cpus = tegra_smp_init_cpus,
+ .smp_prepare_cpus = tegra_smp_prepare_cpus,
+};
+
+struct arm_soc_smp_ops tegra_soc_smp_ops __initdata = {
+ .smp_secondary_init = tegra_secondary_init,
+ .smp_boot_secondary = tegra_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_kill = tegra_cpu_kill,
+ .cpu_die = tegra_cpu_die,
+ .cpu_disable = tegra_cpu_disable,
+#endif
+};
--
1.7.0.4
^ permalink raw reply related
* [PATCH v4 06/10] ARM: SoC: convert Exynos4 to SoC descriptor
From: Marc Zyngier @ 2011-10-03 17:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317663356-5114-1-git-send-email-marc.zyngier@arm.com>
Convert Exynos4 to use the SoC descriptor to provide its SMP
and CPU hotplug operations.
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/mach-exynos4/core.h | 9 +++++++++
arch/arm/mach-exynos4/cpu.c | 8 ++++++++
arch/arm/mach-exynos4/hotplug.c | 8 +++++---
arch/arm/mach-exynos4/mach-armlex4210.c | 3 +++
arch/arm/mach-exynos4/mach-nuri.c | 3 +++
arch/arm/mach-exynos4/mach-origen.c | 3 +++
arch/arm/mach-exynos4/mach-smdk4212.c | 3 +++
arch/arm/mach-exynos4/mach-smdkv310.c | 4 ++++
arch/arm/mach-exynos4/mach-universal_c210.c | 3 +++
arch/arm/mach-exynos4/platsmp.c | 25 +++++++++++++++++++++----
10 files changed, 62 insertions(+), 7 deletions(-)
create mode 100644 arch/arm/mach-exynos4/core.h
diff --git a/arch/arm/mach-exynos4/core.h b/arch/arm/mach-exynos4/core.h
new file mode 100644
index 0000000..ba9fcc8
--- /dev/null
+++ b/arch/arm/mach-exynos4/core.h
@@ -0,0 +1,9 @@
+#include <asm/soc.h>
+
+extern struct arm_soc_smp_init_ops exynos4_soc_smp_init_ops;
+extern struct arm_soc_smp_ops exynos4_soc_smp_ops;
+extern struct arm_soc_desc exynos4_soc_desc;
+
+extern int exynos4_cpu_kill(unsigned int cpu);
+extern void exynos4_cpu_die(unsigned int cpu);
+extern int exynos4_cpu_disable(unsigned int cpu);
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
index 2aa3df0..a15dce8 100644
--- a/arch/arm/mach-exynos4/cpu.c
+++ b/arch/arm/mach-exynos4/cpu.c
@@ -33,6 +33,8 @@
#include <mach/regs-irq.h>
#include <mach/regs-pmu.h>
+#include "core.h"
+
extern int combiner_init(unsigned int combiner_nr, void __iomem *base,
unsigned int irq_start);
extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq);
@@ -282,3 +284,9 @@ int __init exynos4_init(void)
return sysdev_register(&exynos4_sysdev);
}
+
+struct arm_soc_desc exynos4_soc_desc __initdata = {
+ .name = "Samsung Exynos4",
+ soc_smp_init_ops(exynos4_soc_smp_init_ops)
+ soc_smp_ops(exynos4_soc_smp_ops)
+};
diff --git a/arch/arm/mach-exynos4/hotplug.c b/arch/arm/mach-exynos4/hotplug.c
index da70e7e..15fe884 100644
--- a/arch/arm/mach-exynos4/hotplug.c
+++ b/arch/arm/mach-exynos4/hotplug.c
@@ -19,6 +19,8 @@
#include <mach/regs-pmu.h>
+#include "core.h"
+
extern volatile int pen_release;
static inline void cpu_enter_lowpower(void)
@@ -93,7 +95,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
}
}
-int platform_cpu_kill(unsigned int cpu)
+int exynos4_cpu_kill(unsigned int cpu)
{
return 1;
}
@@ -103,7 +105,7 @@ int platform_cpu_kill(unsigned int cpu)
*
* Called with IRQs disabled
*/
-void platform_cpu_die(unsigned int cpu)
+void exynos4_cpu_die(unsigned int cpu)
{
int spurious = 0;
@@ -123,7 +125,7 @@ void platform_cpu_die(unsigned int cpu)
pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious);
}
-int platform_cpu_disable(unsigned int cpu)
+int exynos4_cpu_disable(unsigned int cpu)
{
/*
* we don't allow CPU 0 to be shutdown (it is still too special
diff --git a/arch/arm/mach-exynos4/mach-armlex4210.c b/arch/arm/mach-exynos4/mach-armlex4210.c
index f0ca6c1..8c82c6b 100644
--- a/arch/arm/mach-exynos4/mach-armlex4210.c
+++ b/arch/arm/mach-exynos4/mach-armlex4210.c
@@ -28,6 +28,8 @@
#include <mach/map.h>
+#include "core.h"
+
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define ARMLEX4210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
S3C2410_UCON_RXILEVEL | \
@@ -208,6 +210,7 @@ static void __init armlex4210_machine_init(void)
MACHINE_START(ARMLEX4210, "ARMLEX4210")
/* Maintainer: Alim Akhtar <alim.akhtar@samsung.com> */
.atag_offset = 0x100,
+ .soc = &exynos4_soc_desc,
.init_irq = exynos4_init_irq,
.map_io = armlex4210_map_io,
.init_machine = armlex4210_machine_init,
diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos4/mach-nuri.c
index 2204911..5780ee3 100644
--- a/arch/arm/mach-exynos4/mach-nuri.c
+++ b/arch/arm/mach-exynos4/mach-nuri.c
@@ -48,6 +48,8 @@
#include <mach/map.h>
+#include <asm/soc.h>
+
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define NURI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
S3C2410_UCON_RXILEVEL | \
@@ -1187,6 +1189,7 @@ static void __init nuri_machine_init(void)
MACHINE_START(NURI, "NURI")
/* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
.atag_offset = 0x100,
+ .soc = &exynos4_soc_desc,
.init_irq = exynos4_init_irq,
.map_io = nuri_map_io,
.init_machine = nuri_machine_init,
diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c
index 421294b..06250fc 100644
--- a/arch/arm/mach-exynos4/mach-origen.c
+++ b/arch/arm/mach-exynos4/mach-origen.c
@@ -33,6 +33,8 @@
#include <mach/map.h>
+#include "core.h"
+
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define ORIGEN_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
S3C2410_UCON_RXILEVEL | \
@@ -210,6 +212,7 @@ static void __init origen_machine_init(void)
MACHINE_START(ORIGEN, "ORIGEN")
/* Maintainer: JeongHyeon Kim <jhkim@insignal.co.kr> */
.atag_offset = 0x100,
+ .soc = &exynos4_soc_desc,
.init_irq = exynos4_init_irq,
.map_io = origen_map_io,
.init_machine = origen_machine_init,
diff --git a/arch/arm/mach-exynos4/mach-smdk4212.c b/arch/arm/mach-exynos4/mach-smdk4212.c
index 8c41ae1..cf92514 100644
--- a/arch/arm/mach-exynos4/mach-smdk4212.c
+++ b/arch/arm/mach-exynos4/mach-smdk4212.c
@@ -36,6 +36,8 @@
#include <mach/map.h>
+#include "core.h"
+
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define SMDK4212_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
S3C2410_UCON_RXILEVEL | \
@@ -285,6 +287,7 @@ static void __init smdk4212_machine_init(void)
MACHINE_START(SMDK4212, "SMDK4212")
/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
.atag_offset = 0x100,
+ .soc = &exynos4_soc_desc,
.init_irq = exynos4_init_irq,
.map_io = smdk4212_map_io,
.init_machine = smdk4212_machine_init,
diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c
index cec2afa..525b042 100644
--- a/arch/arm/mach-exynos4/mach-smdkv310.c
+++ b/arch/arm/mach-exynos4/mach-smdkv310.c
@@ -43,6 +43,8 @@
#include <mach/map.h>
+#include "core.h"
+
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define SMDKV310_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
S3C2410_UCON_RXILEVEL | \
@@ -373,6 +375,7 @@ MACHINE_START(SMDKV310, "SMDKV310")
/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
/* Maintainer: Changhwan Youn <chaos.youn@samsung.com> */
.atag_offset = 0x100,
+ .soc = &exynos4_soc_desc,
.init_irq = exynos4_init_irq,
.map_io = smdkv310_map_io,
.init_machine = smdkv310_machine_init,
@@ -383,6 +386,7 @@ MACHINE_END
MACHINE_START(SMDKC210, "SMDKC210")
/* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
.atag_offset = 0x100,
+ .soc = &exynos4_soc_desc,
.init_irq = exynos4_init_irq,
.map_io = smdkv310_map_io,
.init_machine = smdkv310_machine_init,
diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-exynos4/mach-universal_c210.c
index a023faa..0c94673 100644
--- a/arch/arm/mach-exynos4/mach-universal_c210.c
+++ b/arch/arm/mach-exynos4/mach-universal_c210.c
@@ -47,6 +47,8 @@
#include <media/s5p_fimc.h>
#include <media/m5mols.h>
+#include "core.h"
+
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define UNIVERSAL_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
S3C2410_UCON_RXILEVEL | \
@@ -1061,6 +1063,7 @@ static void __init universal_machine_init(void)
MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
/* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
.atag_offset = 0x100,
+ .soc = &exynos4_soc_desc,
.init_irq = exynos4_init_irq,
.map_io = universal_map_io,
.init_machine = universal_machine_init,
diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos4/platsmp.c
index 500453f..1f419fa 100644
--- a/arch/arm/mach-exynos4/platsmp.c
+++ b/arch/arm/mach-exynos4/platsmp.c
@@ -32,6 +32,8 @@
#include <plat/cpu.h>
+#include "core.h"
+
extern void exynos4_secondary_startup(void);
#define CPU1_BOOT_REG (samsung_rev() == EXYNOS4210_REV_1_1 ? \
@@ -89,7 +91,7 @@ static void __cpuinit exynos4_gic_secondary_init(void)
__raw_writel(1, cpu_base + GIC_CPU_CTRL);
}
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit exynos4_secondary_init(unsigned int cpu)
{
/*
* if any interrupts are already enabled for the primary
@@ -113,7 +115,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
set_cpu_online(cpu, true);
}
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit exynos4_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
unsigned long timeout;
@@ -188,7 +190,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
* which may be present or become present in the system.
*/
-void __init smp_init_cpus(void)
+static void __init exynos4_smp_init_cpus(void)
{
void __iomem *scu_base = scu_base_addr();
unsigned int i, ncores;
@@ -210,7 +212,7 @@ void __init smp_init_cpus(void)
set_smp_cross_call(gic_raise_softirq);
}
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init exynos4_smp_prepare_cpus(unsigned int max_cpus)
{
scu_enable(scu_base_addr());
@@ -224,3 +226,18 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
__raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)),
CPU1_BOOT_REG);
}
+
+struct arm_soc_smp_init_ops exynos4_soc_smp_init_ops __initdata = {
+ .smp_init_cpus = exynos4_smp_init_cpus,
+ .smp_prepare_cpus = exynos4_smp_prepare_cpus,
+};
+
+struct arm_soc_smp_ops exynos4_soc_smp_ops __initdata = {
+ .smp_secondary_init = exynos4_secondary_init,
+ .smp_boot_secondary = exynos4_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_kill = exynos4_cpu_kill,
+ .cpu_die = exynos4_cpu_die,
+ .cpu_disable = exynos4_cpu_disable,
+#endif
+};
--
1.7.0.4
^ permalink raw reply related
* [PATCH v4 07/10] ARM: SoC: convert MSM SMP to SoC descriptor
From: Marc Zyngier @ 2011-10-03 17:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317663356-5114-1-git-send-email-marc.zyngier@arm.com>
Convert MSM SMP platforms to use the SoC descriptor to provide
their SMP and CPU hotplug operations.
Cc: David Brown <davidb@codeaurora.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/mach-msm/Makefile | 2 +-
arch/arm/mach-msm/board-msm8960.c | 3 +++
arch/arm/mach-msm/board-msm8x60.c | 7 +++++++
arch/arm/mach-msm/core.c | 17 +++++++++++++++++
arch/arm/mach-msm/core.h | 9 +++++++++
arch/arm/mach-msm/hotplug.c | 8 +++++---
arch/arm/mach-msm/platsmp.c | 24 ++++++++++++++++++++----
7 files changed, 62 insertions(+), 8 deletions(-)
create mode 100644 arch/arm/mach-msm/core.c
create mode 100644 arch/arm/mach-msm/core.h
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index 4ad3969..cba9355 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -1,5 +1,5 @@
obj-y += io.o idle.o timer.o
-obj-y += clock.o
+obj-y += clock.o core.o
obj-$(CONFIG_DEBUG_FS) += clock-debug.o
obj-$(CONFIG_MSM_VIC) += irq-vic.o
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index b04468e..c811e29 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -30,6 +30,7 @@
#include <mach/board.h>
#include <mach/msm_iomap.h>
+#include "core.h"
#include "devices.h"
static void __init msm8960_fixup(struct machine_desc *desc, struct tag *tag,
@@ -94,6 +95,7 @@ static void __init msm8960_rumi3_init(void)
}
MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
+ .soc = &msm_soc_desc,
.fixup = msm8960_fixup,
.reserve = msm8960_reserve,
.map_io = msm8960_map_io,
@@ -103,6 +105,7 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")
MACHINE_END
MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3")
+ .soc = &msm_soc_desc,
.fixup = msm8960_fixup,
.reserve = msm8960_reserve,
.map_io = msm8960_map_io,
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
index 4ad2afb..a4bd858 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -28,6 +28,8 @@
#include <mach/board.h>
#include <mach/msm_iomap.h>
+#include "core.h"
+
static void __init msm8x60_fixup(struct machine_desc *desc, struct tag *tag,
char **cmdline, struct meminfo *mi)
{
@@ -115,6 +117,7 @@ static const char *msm8x60_fluid_match[] __initdata = {
#endif /* CONFIG_OF */
MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
+ .soc = &msm_soc_desc,
.fixup = msm8x60_fixup,
.reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
@@ -124,6 +127,7 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")
MACHINE_END
MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
+ .soc = &msm_soc_desc,
.fixup = msm8x60_fixup,
.reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
@@ -133,6 +137,7 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")
MACHINE_END
MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
+ .soc = &msm_soc_desc,
.fixup = msm8x60_fixup,
.reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
@@ -142,6 +147,7 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")
MACHINE_END
MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA")
+ .soc = &msm_soc_desc,
.fixup = msm8x60_fixup,
.reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
@@ -153,6 +159,7 @@ MACHINE_END
#ifdef CONFIG_OF
/* TODO: General device tree support for all MSM. */
DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
+ .soc = &msm_soc_desc,
.fixup = msm8x60_fixup,
.reserve = msm8x60_reserve,
.map_io = msm8x60_map_io,
diff --git a/arch/arm/mach-msm/core.c b/arch/arm/mach-msm/core.c
new file mode 100644
index 0000000..390cde7
--- /dev/null
+++ b/arch/arm/mach-msm/core.c
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2011 ARM Ltd.
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include "core.h"
+
+struct arm_soc_desc msm_soc_desc __initdata = {
+ .name = "Qualcomm MSM",
+ soc_smp_init_ops(msm_soc_smp_init_ops)
+ soc_smp_ops(msm_soc_smp_ops)
+};
diff --git a/arch/arm/mach-msm/core.h b/arch/arm/mach-msm/core.h
new file mode 100644
index 0000000..e8394dd
--- /dev/null
+++ b/arch/arm/mach-msm/core.h
@@ -0,0 +1,9 @@
+#include <asm/soc.h>
+
+extern struct arm_soc_smp_init_ops msm_soc_smp_init_ops;
+extern struct arm_soc_smp_ops msm_soc_smp_ops;
+extern struct arm_soc_desc msm_soc_desc;
+
+extern int msm_cpu_kill(unsigned int cpu);
+extern void msm_cpu_die(unsigned int cpu);
+extern int msm_cpu_disable(unsigned int cpu);
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c
index 41c252d..eef1b30 100644
--- a/arch/arm/mach-msm/hotplug.c
+++ b/arch/arm/mach-msm/hotplug.c
@@ -12,6 +12,8 @@
#include <asm/cacheflush.h>
+#include "core.h"
+
extern volatile int pen_release;
static inline void cpu_enter_lowpower(void)
@@ -56,7 +58,7 @@ static inline void platform_do_lowpower(unsigned int cpu)
}
}
-int platform_cpu_kill(unsigned int cpu)
+int msm_cpu_kill(unsigned int cpu)
{
return 1;
}
@@ -66,7 +68,7 @@ int platform_cpu_kill(unsigned int cpu)
*
* Called with IRQs disabled
*/
-void platform_cpu_die(unsigned int cpu)
+void msm_cpu_die(unsigned int cpu)
{
/*
* we're ready for shutdown now, so do it
@@ -81,7 +83,7 @@ void platform_cpu_die(unsigned int cpu)
cpu_leave_lowpower();
}
-int platform_cpu_disable(unsigned int cpu)
+int msm_cpu_disable(unsigned int cpu)
{
/*
* we don't allow CPU 0 to be shutdown (it is still too special
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
index e3375ee..4902c16 100644
--- a/arch/arm/mach-msm/platsmp.c
+++ b/arch/arm/mach-msm/platsmp.c
@@ -24,6 +24,7 @@
#include <mach/msm_iomap.h>
#include "scm-boot.h"
+#include "core.h"
#define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0
#define SCSS_CPU1CORE_RESET 0xD80
@@ -47,7 +48,7 @@ static inline int get_core_count(void)
return ((read_cpuid_id() >> 4) & 3) + 1;
}
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit msm_secondary_init(unsigned int cpu)
{
/* Configure edge-triggered PPIs */
writel(GIC_PPI_EDGE_MASK, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4);
@@ -92,7 +93,7 @@ static __cpuinit void prepare_cold_cpu(unsigned int cpu)
"address\n");
}
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit msm_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
unsigned long timeout;
static int cold_boot_done;
@@ -152,7 +153,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
* does not support the ARM SCU, so just set the possible cpu mask to
* NR_CPUS.
*/
-void __init smp_init_cpus(void)
+static void __init msm_smp_init_cpus(void)
{
unsigned int i, ncores = get_core_count();
@@ -162,6 +163,21 @@ void __init smp_init_cpus(void)
set_smp_cross_call(gic_raise_softirq);
}
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init msm_smp_prepare_cpus(unsigned int max_cpus)
{
}
+
+struct arm_soc_smp_init_ops msm_soc_smp_init_ops __initdata = {
+ .smp_init_cpus = msm_smp_init_cpus,
+ .smp_prepare_cpus = msm_smp_prepare_cpus,
+};
+
+struct arm_soc_smp_ops msm_soc_smp_ops __initdata = {
+ .smp_secondary_init = msm_secondary_init,
+ .smp_boot_secondary = msm_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_kill = msm_cpu_kill,
+ .cpu_die = msm_cpu_die,
+ .cpu_disable = msm_cpu_disable,
+#endif
+};
--
1.7.0.4
^ permalink raw reply related
* [PATCH v4 08/10] ARM: SoC: convert ux500 to SoC descriptor
From: Marc Zyngier @ 2011-10-03 17:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317663356-5114-1-git-send-email-marc.zyngier@arm.com>
Convert ux500 platforms to use the SoC descriptor to provide
their SMP and CPU hotplug operations.
Cc: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/mach-ux500/board-mop500.c | 3 +++
arch/arm/mach-ux500/board-u5500.c | 1 +
arch/arm/mach-ux500/hotplug.c | 8 +++++---
arch/arm/mach-ux500/include/mach/setup.h | 9 +++++++++
arch/arm/mach-ux500/platsmp.c | 23 +++++++++++++++++++----
5 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index bdd7b80..f0b1a00 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -691,6 +691,7 @@ static void __init hrefv60_init_machine(void)
MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
/* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */
.atag_offset = 0x100,
+ .soc = &ux500_soc_desc,
.map_io = u8500_map_io,
.init_irq = ux500_init_irq,
/* we re-use nomadik timer here */
@@ -700,6 +701,7 @@ MACHINE_END
MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
.atag_offset = 0x100,
+ .soc = &ux500_soc_desc,
.map_io = u8500_map_io,
.init_irq = ux500_init_irq,
.timer = &ux500_timer,
@@ -708,6 +710,7 @@ MACHINE_END
MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
.atag_offset = 0x100,
+ .soc = &ux500_soc_desc,
.map_io = u8500_map_io,
.init_irq = ux500_init_irq,
/* we re-use nomadik timer here */
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c
index 82025ba..aeb125a 100644
--- a/arch/arm/mach-ux500/board-u5500.c
+++ b/arch/arm/mach-ux500/board-u5500.c
@@ -146,6 +146,7 @@ static void __init u5500_init_machine(void)
MACHINE_START(U5500, "ST-Ericsson U5500 Platform")
.atag_offset = 0x100,
+ .soc = &ux500_soc_desc,
.map_io = u5500_map_io,
.init_irq = ux500_init_irq,
.timer = &ux500_timer,
diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c
index 572015e..03424ab 100644
--- a/arch/arm/mach-ux500/hotplug.c
+++ b/arch/arm/mach-ux500/hotplug.c
@@ -14,6 +14,8 @@
#include <asm/cacheflush.h>
+#include <mach/setup.h>
+
extern volatile int pen_release;
static inline void platform_do_lowpower(unsigned int cpu)
@@ -33,7 +35,7 @@ static inline void platform_do_lowpower(unsigned int cpu)
}
}
-int platform_cpu_kill(unsigned int cpu)
+int ux500_cpu_kill(unsigned int cpu)
{
return 1;
}
@@ -43,13 +45,13 @@ int platform_cpu_kill(unsigned int cpu)
*
* Called with IRQs disabled
*/
-void platform_cpu_die(unsigned int cpu)
+void ux500_cpu_die(unsigned int cpu)
{
/* directly enter low power state, skipping secure registers */
platform_do_lowpower(cpu);
}
-int platform_cpu_disable(unsigned int cpu)
+int ux500_cpu_disable(unsigned int cpu)
{
/*
* we don't allow CPU 0 to be shutdown (it is still too special
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h
index a7d363f..e764530 100644
--- a/arch/arm/mach-ux500/include/mach/setup.h
+++ b/arch/arm/mach-ux500/include/mach/setup.h
@@ -11,6 +11,7 @@
#ifndef __ASM_ARCH_SETUP_H
#define __ASM_ARCH_SETUP_H
+#include <asm/soc.h>
#include <asm/mach/time.h>
#include <linux/init.h>
@@ -50,4 +51,12 @@ extern struct sys_timer ux500_timer;
.type = MT_MEMORY, \
}
+extern struct arm_soc_smp_init_ops ux500_soc_smp_init_ops;
+extern struct arm_soc_smp_ops ux500_soc_smp_ops;
+extern struct arm_soc_desc ux500_soc_desc;
+
+extern int ux500_cpu_kill(unsigned int cpu);
+extern void ux500_cpu_die(unsigned int cpu);
+extern int ux500_cpu_disable(unsigned int cpu);
+
#endif /* __ASM_ARCH_SETUP_H */
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index 27e5281..9e9254c 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -59,7 +59,7 @@ static void __iomem *scu_base_addr(void)
static DEFINE_SPINLOCK(boot_lock);
-void __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit ux500_secondary_init(unsigned int cpu)
{
/*
* if any interrupts are already enabled for the primary
@@ -81,7 +81,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
spin_unlock(&boot_lock);
}
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+static int __cpuinit ux500_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
unsigned long timeout;
@@ -148,7 +148,7 @@ static void __init wakeup_secondary(void)
* Initialise the CPU possible map early - this describes the CPUs
* which may be present or become present in the system.
*/
-void __init smp_init_cpus(void)
+static void __init ux500_smp_init_cpus(void)
{
void __iomem *scu_base = scu_base_addr();
unsigned int i, ncores;
@@ -170,9 +170,24 @@ void __init smp_init_cpus(void)
set_smp_cross_call(gic_raise_softirq);
}
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init ux500_smp_prepare_cpus(unsigned int max_cpus)
{
scu_enable(scu_base_addr());
wakeup_secondary();
}
+
+struct arm_soc_smp_init_ops ux500_soc_smp_init_ops __initdata = {
+ .smp_init_cpus = ux500_smp_init_cpus,
+ .smp_prepare_cpus = ux500_smp_prepare_cpus,
+};
+
+struct arm_soc_smp_ops ux500_soc_smp_ops __initdata = {
+ .smp_secondary_init = ux500_secondary_init,
+ .smp_boot_secondary = ux500_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_kill = ux500_cpu_kill,
+ .cpu_die = ux500_cpu_die,
+ .cpu_disable = ux500_cpu_disable,
+#endif
+};
--
1.7.0.4
^ permalink raw reply related
* [PATCH v4 09/10] ARM: SoC: convert shmobile sh73a0 to SoC descriptor
From: Marc Zyngier @ 2011-10-03 17:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317663356-5114-1-git-send-email-marc.zyngier@arm.com>
Convert shmobile SMP platform to use the SoC descriptor to provide
its SMP and CPU hotplug operations.
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/mach-shmobile/Makefile | 2 +-
arch/arm/mach-shmobile/board-ag5evm.c | 1 +
arch/arm/mach-shmobile/hotplug.c | 8 ++-
arch/arm/mach-shmobile/include/mach/common.h | 7 +--
arch/arm/mach-shmobile/include/mach/sh73a0.h | 6 ++
arch/arm/mach-shmobile/platsmp.c | 68 --------------------------
arch/arm/mach-shmobile/setup-sh73a0.c | 6 ++
arch/arm/mach-shmobile/smp-sh73a0.c | 35 ++++++++++++--
8 files changed, 53 insertions(+), 80 deletions(-)
delete mode 100644 arch/arm/mach-shmobile/platsmp.c
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index 612b270..43754f3 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -12,7 +12,7 @@ obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o
obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o
# SMP objects
-smp-y := platsmp.o headsmp.o
+smp-y := headsmp.o
smp-$(CONFIG_HOTPLUG_CPU) += hotplug.o
smp-$(CONFIG_LOCAL_TIMERS) += localtimer.o
smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index 475342b..448f51a 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -601,6 +601,7 @@ struct sys_timer ag5evm_timer = {
MACHINE_START(AG5EVM, "ag5evm")
.map_io = ag5evm_map_io,
+ .soc = &sh73a0_soc_desc,
.init_irq = ag5evm_init_irq,
.handle_irq = shmobile_handle_irq_gic,
.init_machine = ag5evm_init,
diff --git a/arch/arm/mach-shmobile/hotplug.c b/arch/arm/mach-shmobile/hotplug.c
index 238a0d9..687c8c2 100644
--- a/arch/arm/mach-shmobile/hotplug.c
+++ b/arch/arm/mach-shmobile/hotplug.c
@@ -13,12 +13,14 @@
#include <linux/errno.h>
#include <linux/smp.h>
-int platform_cpu_kill(unsigned int cpu)
+#include <mach/common.h>
+
+int shmobile_cpu_kill(unsigned int cpu)
{
return 1;
}
-void platform_cpu_die(unsigned int cpu)
+void shmobile_cpu_die(unsigned int cpu)
{
while (1) {
/*
@@ -31,7 +33,7 @@ void platform_cpu_die(unsigned int cpu)
}
}
-int platform_cpu_disable(unsigned int cpu)
+int shmobile_cpu_disable(unsigned int cpu)
{
/*
* we don't allow CPU 0 to be shutdown (it is still too special
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index c0cdbf9..2283521 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -48,9 +48,8 @@ extern void sh73a0_pinmux_init(void);
extern struct clk sh73a0_extal1_clk;
extern struct clk sh73a0_extal2_clk;
-extern unsigned int sh73a0_get_core_count(void);
-extern void sh73a0_secondary_init(unsigned int cpu);
-extern int sh73a0_boot_secondary(unsigned int cpu);
-extern void sh73a0_smp_prepare_cpus(void);
+extern int shmobile_cpu_kill(unsigned int cpu);
+extern void shmobile_cpu_die(unsigned int cpu);
+extern int shmobile_cpu_disable(unsigned int cpu);
#endif /* __ARCH_MACH_COMMON_H */
diff --git a/arch/arm/mach-shmobile/include/mach/sh73a0.h b/arch/arm/mach-shmobile/include/mach/sh73a0.h
index b385e97..d22a1a5 100644
--- a/arch/arm/mach-shmobile/include/mach/sh73a0.h
+++ b/arch/arm/mach-shmobile/include/mach/sh73a0.h
@@ -507,4 +507,10 @@ enum {
SHDMA_SLAVE_MMCIF_RX,
};
+#include <asm/soc.h>
+
+extern struct arm_soc_smp_init_ops sh73a0_soc_smp_init_ops;
+extern struct arm_soc_smp_ops sh73a0_soc_smp_ops;
+extern struct arm_soc_desc sh73a0_soc_desc;
+
#endif /* __ASM_SH73A0_H__ */
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
deleted file mode 100644
index 66f9806..0000000
--- a/arch/arm/mach-shmobile/platsmp.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * SMP support for R-Mobile / SH-Mobile
- *
- * Copyright (C) 2010 Magnus Damm
- * Copyright (C) 2011 Paul Mundt
- *
- * Based on vexpress, Copyright (C) 2002 ARM Ltd, All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/delay.h>
-#include <linux/device.h>
-#include <linux/smp.h>
-#include <linux/io.h>
-#include <asm/hardware/gic.h>
-#include <asm/localtimer.h>
-#include <asm/mach-types.h>
-#include <mach/common.h>
-
-static unsigned int __init shmobile_smp_get_core_count(void)
-{
- if (machine_is_ag5evm())
- return sh73a0_get_core_count();
-
- return 1;
-}
-
-static void __init shmobile_smp_prepare_cpus(void)
-{
- if (machine_is_ag5evm())
- sh73a0_smp_prepare_cpus();
-}
-
-void __cpuinit platform_secondary_init(unsigned int cpu)
-{
- trace_hardirqs_off();
-
- if (machine_is_ag5evm())
- sh73a0_secondary_init(cpu);
-}
-
-int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
-{
- if (machine_is_ag5evm())
- return sh73a0_boot_secondary(cpu);
-
- return -ENOSYS;
-}
-
-void __init smp_init_cpus(void)
-{
- unsigned int ncores = shmobile_smp_get_core_count();
- unsigned int i;
-
- for (i = 0; i < ncores; i++)
- set_cpu_possible(i, true);
-
- set_smp_cross_call(gic_raise_softirq);
-}
-
-void __init platform_smp_prepare_cpus(unsigned int max_cpus)
-{
- shmobile_smp_prepare_cpus();
-}
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index e46821c..85ab3e1 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -672,3 +672,9 @@ void __init sh73a0_add_early_devices(void)
early_platform_add_devices(sh73a0_early_devices,
ARRAY_SIZE(sh73a0_early_devices));
}
+
+struct arm_soc_desc sh73a0_soc_desc __initdata = {
+ .name = "Renesas sh73a0",
+ soc_smp_init_ops(sh73a0_soc_smp_init_ops)
+ soc_smp_ops(sh73a0_soc_smp_ops)
+};
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
index be1ade7..274b9c5 100644
--- a/arch/arm/mach-shmobile/smp-sh73a0.c
+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
@@ -23,6 +23,7 @@
#include <linux/spinlock.h>
#include <linux/io.h>
#include <mach/common.h>
+#include <mach/sh73a0.h>
#include <asm/smp_scu.h>
#include <asm/smp_twd.h>
#include <asm/hardware/gic.h>
@@ -55,7 +56,7 @@ static void modify_scu_cpu_psr(unsigned long set, unsigned long clr)
__raw_writel(tmp, scu_base + 8);
}
-unsigned int __init sh73a0_get_core_count(void)
+static unsigned int __init sh73a0_get_core_count(void)
{
void __iomem *scu_base = scu_base_addr();
@@ -67,12 +68,12 @@ unsigned int __init sh73a0_get_core_count(void)
return scu_get_core_count(scu_base);
}
-void __cpuinit sh73a0_secondary_init(unsigned int cpu)
+static void __cpuinit sh73a0_secondary_init(unsigned int cpu)
{
gic_secondary_init(0);
}
-int __cpuinit sh73a0_boot_secondary(unsigned int cpu)
+static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
cpu = cpu_logical_map(cpu);
@@ -87,7 +88,7 @@ int __cpuinit sh73a0_boot_secondary(unsigned int cpu)
return 0;
}
-void __init sh73a0_smp_prepare_cpus(void)
+static void __init sh73a0_smp_prepare_cpus(unsigned int max_cpus)
{
int cpu = cpu_logical_map(0);
@@ -100,3 +101,29 @@ void __init sh73a0_smp_prepare_cpus(void)
/* enable cache coherency on CPU0 */
modify_scu_cpu_psr(0, 3 << (cpu * 8));
}
+
+static void __init sh73a0_smp_init_cpus(void)
+{
+ unsigned int ncores = sh73a0_get_core_count();
+ unsigned int i;
+
+ for (i = 0; i < ncores; i++)
+ set_cpu_possible(i, true);
+
+ set_smp_cross_call(gic_raise_softirq);
+}
+
+struct arm_soc_smp_init_ops sh73a0_soc_smp_init_ops __initdata = {
+ .smp_init_cpus = sh73a0_smp_init_cpus,
+ .smp_prepare_cpus = sh73a0_smp_prepare_cpus,
+};
+
+struct arm_soc_smp_ops sh73a0_soc_smp_ops __initdata = {
+ .smp_secondary_init = sh73a0_secondary_init,
+ .smp_boot_secondary = sh73a0_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_kill = shmobile_cpu_kill,
+ .cpu_die = shmobile_cpu_die,
+ .cpu_disable = shmobile_cpu_disable,
+#endif
+};
--
1.7.0.4
^ permalink raw reply related
* [PATCH v4 10/10] ARM: smp: Make SoC descriptor mandatory for SMP platforms
From: Marc Zyngier @ 2011-10-03 17:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317663356-5114-1-git-send-email-marc.zyngier@arm.com>
Now that all SMP platforms have been converted to the SOC descriptor
and its SMP operations, remove the "weak" attribute from the hooks
in smp.c, and make the functions static wherever possible.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
arch/arm/include/asm/smp.h | 15 ---------------
arch/arm/kernel/smp.c | 18 +++++++++---------
2 files changed, 9 insertions(+), 24 deletions(-)
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
index 674ebcd..bf25484 100644
--- a/arch/arm/include/asm/smp.h
+++ b/arch/arm/include/asm/smp.h
@@ -56,16 +56,6 @@ extern int boot_secondary(unsigned int cpu, struct task_struct *);
asmlinkage void secondary_start_kernel(void);
/*
- * Perform platform specific initialisation of the specified CPU.
- */
-extern void platform_secondary_init(unsigned int cpu);
-
-/*
- * Initialize cpu_possible map, and enable coherency
- */
-extern void platform_smp_prepare_cpus(unsigned int);
-
-/*
* Logical CPU mapping.
*/
extern int __cpu_logical_map[NR_CPUS];
@@ -82,15 +72,10 @@ struct secondary_data {
extern struct secondary_data secondary_data;
extern int __cpu_disable(void);
-extern int platform_cpu_disable(unsigned int cpu);
extern void __cpu_die(unsigned int cpu);
extern void cpu_die(void);
-extern void platform_cpu_die(unsigned int cpu);
-extern int platform_cpu_kill(unsigned int cpu);
-extern void platform_cpu_enable(unsigned int cpu);
-
extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index e08d2e8..c594ed2 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -157,25 +157,25 @@ int __cpuinit __cpu_up(unsigned int cpu)
}
/* SoC helpers */
-void __attribute__((weak)) __init smp_init_cpus(void)
+void __init smp_init_cpus(void)
{
if (soc_smp_init_ops && soc_smp_init_ops->smp_init_cpus)
soc_smp_init_ops->smp_init_cpus();
}
-void __attribute__((weak)) __init platform_smp_prepare_cpus(unsigned int max_cpus)
+static void __init platform_smp_prepare_cpus(unsigned int max_cpus)
{
if (soc_smp_ops && soc_smp_init_ops->smp_prepare_cpus)
soc_smp_init_ops->smp_prepare_cpus(max_cpus);
}
-void __attribute__((weak)) __cpuinit platform_secondary_init(unsigned int cpu)
+static void __cpuinit platform_secondary_init(unsigned int cpu)
{
if (soc_smp_ops && soc_smp_ops->smp_secondary_init)
soc_smp_ops->smp_secondary_init(cpu);
}
-int __attribute__((weak)) __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
+int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
{
if (soc_smp_ops && soc_smp_ops->smp_boot_secondary)
return soc_smp_ops->smp_boot_secondary(cpu, idle);
@@ -185,20 +185,20 @@ int __attribute__((weak)) __cpuinit boot_secondary(unsigned int cpu, struct task
#ifdef CONFIG_HOTPLUG_CPU
static void percpu_timer_stop(void);
-int __attribute__((weak)) __cpuinit platform_cpu_kill(unsigned int cpu)
+static int __cpuinit platform_cpu_kill(unsigned int cpu)
{
if (soc_smp_ops && soc_smp_ops->cpu_kill)
return soc_smp_ops->cpu_kill(cpu);
return 0;
}
-void __attribute__((weak)) __cpuinit platform_cpu_die(unsigned int cpu)
+static void __cpuinit platform_cpu_die(unsigned int cpu)
{
if (soc_smp_ops && soc_smp_ops->cpu_die)
soc_smp_ops->cpu_die(cpu);
}
-int __attribute__((weak)) __cpuinit platform_cpu_disable(unsigned int cpu)
+static int __cpuinit platform_cpu_disable(unsigned int cpu)
{
if (soc_smp_ops && soc_smp_ops->cpu_disable)
return soc_smp_ops->cpu_disable(cpu);
@@ -208,7 +208,7 @@ int __attribute__((weak)) __cpuinit platform_cpu_disable(unsigned int cpu)
/*
* __cpu_disable runs on the processor to be shutdown.
*/
-int __cpu_disable(void)
+int __cpuinit __cpu_disable(void)
{
unsigned int cpu = smp_processor_id();
struct task_struct *p;
@@ -257,7 +257,7 @@ static DECLARE_COMPLETION(cpu_died);
* called on the thread which is asking for a CPU to be shutdown -
* waits until shutdown has completed, or it is timed out.
*/
-void __cpu_die(unsigned int cpu)
+void __cpuinit __cpu_die(unsigned int cpu)
{
if (!wait_for_completion_timeout(&cpu_died, msecs_to_jiffies(5000))) {
pr_err("CPU%u: cpu didn't die\n", cpu);
--
1.7.0.4
^ permalink raw reply related
* [PATCH 04/30] ARM: omap: add missing __devexit_p() annotations
From: Tony Lindgren @ 2011-10-03 17:46 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20111002160926.GB12323@n2100.arm.linux.org.uk>
* Russell King - ARM Linux <linux@arm.linux.org.uk> [111002 08:35]:
> On Sun, Oct 02, 2011 at 05:56:07PM +0200, Bjarne Steinsbo wrote:
> > Arnd,
> >
> > Ref http://www.spinics.net/lists/linux-omap/msg57274.html
> >
> > Don't get me wrong. This is not about you "stealing" my patch, or
> > anything like that. But look also at thread starting at
> > http://www.spinics.net/lists/linux-omap/msg57667.html Also a patch
> > that I have posted previously. Something is not right with the
> > workflow when bugs are identified, patches are submitted, then
> > ignored, only for someone else to fix the same bug. Enough said.
>
> That is where re-sending is important. Don't throw patches over the wall
> and then forget them - that's precisely how this happens.
Bjarne, sorry for accidentally dropping patches, that's not intentional.
Like Russell said, please follow through with your own patches and
repost and complain until the patches do get merged.
> Consider who has the higher workload, and who ends up dealing with many
> many many emails, and realise that the options for those of us who receive
> patches are either to drop patches, or have an endlessly growing backlog
> of patches when things get busy.
>
> Unless we drop patches, things can get pretty rediculous - consider the
> effect of a backlog of one month worth of patches would cause...
Tools like patchwork.kernel.org help a bit, and especially the email
subject line containing magic the keyword "fix" might help avoiding
the duplicate work.
Regards,
Tony
^ permalink raw reply
* [PATCH 04/30] ARM: omap: add missing __devexit_p() annotations
From: Tony Lindgren @ 2011-10-03 17:48 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAFULf_wevZxWW1RW+r-18R_8=ry2kD6_i5L9NfPd9t8afm5Cog@mail.gmail.com>
* Bjarne Steinsbo <bsteinsbo@gmail.com> [111002 08:22]:
> Arnd,
>
> Ref http://www.spinics.net/lists/linux-omap/msg57274.html
>
> Don't get me wrong. This is not about you "stealing" my patch, or
> anything like that. But look also at thread starting at
> http://www.spinics.net/lists/linux-omap/msg57667.html Also a patch
> that I have posted previously. Something is not right with the
> workflow when bugs are identified, patches are submitted, then
> ignored, only for someone else to fix the same bug. Enough said.
Arnd, I suggest using Bjarne's earlier patch here:
Acked-by: Tony Lindgren <tony@atomide.com>
> On Sun, Oct 2, 2011 at 4:45 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > Drivers that refer to a __devexit function in an operations
> > structure need to annotate that pointer with __devexit_p so
> > replace it with a NULL pointer when the section gets discarded.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> > ?arch/arm/mach-omap2/smartreflex.c | ? ?2 +-
> > ?arch/arm/plat-omap/dma.c ? ? ? ? ?| ? ?2 +-
> > ?2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> > index 34c01a7..67bc6ce 100644
> > --- a/arch/arm/mach-omap2/smartreflex.c
> > +++ b/arch/arm/mach-omap2/smartreflex.c
> > @@ -1002,7 +1002,7 @@ static int __devexit omap_sr_remove(struct platform_device *pdev)
> > ?}
> >
> > ?static struct platform_driver smartreflex_driver = {
> > - ? ? ? .remove ? ? ? ? = omap_sr_remove,
> > + ? ? ? .remove ? ? ? ? = __devexit_p(omap_sr_remove),
> > ? ? ? ?.driver ? ? ? ? = {
> > ? ? ? ? ? ? ? ?.name ? = "smartreflex",
> > ? ? ? ?},
> > diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> > index c22217c..f7150ba 100644
> > --- a/arch/arm/plat-omap/dma.c
> > +++ b/arch/arm/plat-omap/dma.c
> > @@ -2105,7 +2105,7 @@ static int __devexit omap_system_dma_remove(struct platform_device *pdev)
> >
> > ?static struct platform_driver omap_system_dma_driver = {
> > ? ? ? ?.probe ? ? ? ? ?= omap_system_dma_probe,
> > - ? ? ? .remove ? ? ? ? = omap_system_dma_remove,
> > + ? ? ? .remove ? ? ? ? = __devexit_p(omap_system_dma_remove),
> > ? ? ? ?.driver ? ? ? ? = {
> > ? ? ? ? ? ? ? ?.name ? = "omap_dma_system"
> > ? ? ? ?},
> > --
> > 1.7.5.4
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> > the body of a message to majordomo at vger.kernel.org
> > More majordomo info at ?http://vger.kernel.org/majordomo-info.html
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply
* [PATCH 05/30] ARM: omap: enable building omap2 without omap2420/2430
From: Tony Lindgren @ 2011-10-03 17:53 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317566760-25681-6-git-send-email-arnd@arndb.de>
* Arnd Bergmann <arnd@arndb.de> [111002 07:13]:
> Kconfig allows selecting CONFIG_OMAP2 but no specific SOC, the options
> being omap2420 and omap2430, but that leads to a build error when
> omap3 or omap4 are also enabled and the MULTI_OMAP2 symbol is
> undefined.
>
> This adds another clause to plat/multi.h, mainly to allow all
> possible randconfig combinations to build cleanly.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/plat-omap/include/plat/multi.h | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-omap/include/plat/multi.h b/arch/arm/plat-omap/include/plat/multi.h
> index 999ffba..fb7f196 100644
> --- a/arch/arm/plat-omap/include/plat/multi.h
> +++ b/arch/arm/plat-omap/include/plat/multi.h
> @@ -82,6 +82,11 @@
> # define OMAP_NAME omap2430
> # endif
> #endif
> +#ifdef CONFIG_ARCH_OMAP2
> +# ifndef OMAP_NAME
> +# define OMAP_NAME omap2
> +# endif
> +#endif
> #ifdef CONFIG_ARCH_OMAP3
> # ifdef OMAP_NAME
> # undef MULTI_OMAP2
> --
> 1.7.5.4
>
^ permalink raw reply
* [PATCH 08/30] ARM: omap2+: fix building without i2c
From: Tony Lindgren @ 2011-10-03 17:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1443629.oeLM18uNcs@wuerfel>
* Arnd Bergmann <arnd@arndb.de> [111003 02:15]:
> On Sunday 02 October 2011 19:31:25 Paul Walmsley wrote:
>
> > Nice catch. I think the bug is different, though. omap_i2c_reset should
> > never be NULL: that code is intended to execute even when
> > CONFIG_I2C_OMAP=n. The idea is to prevent the IP block from interfering
> > with the rest of the kernel even if the driver is not compiled in, no
> > matter how the bootloader or previous OS programmed the IP block.
> >
> > I'd suggest something like the following patch instead.
> >
> >
> > - Paul
> >
> > From: Paul Walmsley <paul@pwsan.com>
> > Date: Sun, 2 Oct 2011 19:15:10 -0600
> > Subject: [PATCH] ARM: omap2+: fix build breakage when CONFIG_I2C_OMAP=n
> >
> > arch/arm/mach-omap2/Makefile incorrectly skips compilation of the I2C
> > IP block reset code when CONFIG_I2C_OMAP=n. Fix by unconditionally
> > compiling arch/arm/mach-omap2/i2c.o, which is needed on all OMAP2+ platforms.
> >
> > Problem noted by Arnd Bergmann <arnd@arndb.de>.
>
> Ok, looks better. You should also drop patch 6 "ARM: omap: fix build with
> CONFIG_I2C_OMAP disabled" then.
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
Arnd I suggest you replace your patch with this in your branch.
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply
* [PATCH 09/30] ARM: omap2: export functions used by nand driver
From: Tony Lindgren @ 2011-10-03 17:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317566760-25681-10-git-send-email-arnd@arndb.de>
* Arnd Bergmann <arnd@arndb.de> [111002 07:13]:
> The omap nand driver uses the gpmc_enable_hwecc and
> gpmc_calculate_ecc functions from the platform code,
> but can be built as a module.
>
> This only works if the functions are exported.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/mach-omap2/gpmc.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
> index 130034b..4ed6880 100644
> --- a/arch/arm/mach-omap2/gpmc.c
> +++ b/arch/arm/mach-omap2/gpmc.c
> @@ -882,6 +882,7 @@ int gpmc_enable_hwecc(int cs, int mode, int dev_width, int ecc_size)
> gpmc_write_reg(GPMC_ECC_CONFIG, val);
> return 0;
> }
> +EXPORT_SYMBOL_GPL(gpmc_enable_hwecc);
>
> /**
> * gpmc_calculate_ecc - generate non-inverted ecc bytes
> @@ -912,3 +913,4 @@ int gpmc_calculate_ecc(int cs, const u_char *dat, u_char *ecc_code)
> gpmc_ecc_used = -EINVAL;
> return 0;
> }
> +EXPORT_SYMBOL_GPL(gpmc_calculate_ecc);
> --
> 1.7.5.4
>
^ permalink raw reply
* [PATCH 10/30] ARM: omap/iommu: always provide iommu debug code
From: Tony Lindgren @ 2011-10-03 17:57 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317566760-25681-11-git-send-email-arnd@arndb.de>
* Arnd Bergmann <arnd@arndb.de> [111002 07:13]:
> The iommu module on omap contains a few functions that are
> only used by the debug module. These are however only there
> when the debug code is built as a module. Since it is possible
> to build the debug code into the kernel, the functions should
> also be provided for the built-in case.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/plat-omap/iommu.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
> index 34fc31e..9d43ce1 100644
> --- a/arch/arm/plat-omap/iommu.c
> +++ b/arch/arm/plat-omap/iommu.c
> @@ -391,7 +391,7 @@ void iommu_set_twl(struct iommu *obj, bool on)
> }
> EXPORT_SYMBOL_GPL(iommu_set_twl);
>
> -#if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE)
> +#if defined(CONFIG_OMAP_IOMMU_DEBUG) || defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE)
>
> ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t bytes)
> {
> --
> 1.7.5.4
>
^ permalink raw reply
* [PATCH 11/30] ARM: omap2/n8x0: work around modular omap mmc
From: Tony Lindgren @ 2011-10-03 18:03 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1412062.DNcqS3fczZ@wuerfel>
* Arnd Bergmann <arnd@arndb.de> [111002 11:22]:
> On Sunday 02 October 2011 16:53:31 Russell King - ARM Linux wrote:
> > On Sun, Oct 02, 2011 at 04:45:41PM +0200, Arnd Bergmann wrote:
> > > -#if defined(CONFIG_MENELAUS) && \
> > > - (defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE))
> > > +#if defined(CONFIG_MENELAUS) && defined(CONFIG_MMC_OMAP)
> > > +/* || defined(CONFIG_MMC_OMAP_MODULE)) */
> > > +/* FIXME: cannot call omap_mmc_notify_cover_event for ONFIG_MMC_OMAP_MODULE */
> >
> > #ifdef CONFIG_MMC_OMAP_MODULE
> > #warning FIXME: cannot call omap_mmc_notify_cover_event for CONFIG_MMC_OMAP_MODULE
> > #endif
> > #if defined(CONFIG_MENELAUS) && defined(CONFIG_MMC_OMAP)
> >
> > So that it can be seen at build time?
> >
> > Also note the 'ONFIG' typo...
>
> Ok, good idea. I've updated the patch in the git tree accordingly.
Acked-by: Tony Lindgren <tony@atomide.com>
> Depending on what Tony wants, I might send out the entire series
> again once there are no more new comments.
Up to you, I usually prefer to see just updated patches as long
as the mail thread stays readable.
Regards,
Tony
^ permalink raw reply
* [PATCH 12/30] ARM: omap4: always build omap_phy_internal
From: Tony Lindgren @ 2011-10-03 18:04 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317566760-25681-13-git-send-email-arnd@arndb.de>
* Arnd Bergmann <arnd@arndb.de> [111002 07:13]:
> The functions defined in omap_phy_internal.c are requrired on
> omap4-only configurations, not just for specific boards.
>
> twl-common.c:(.init.text+0x6b40): undefined reference to `omap4430_phy_init'
> twl-common.c:(.init.text+0x6c68): undefined reference to `omap4430_phy_init'
> mach-omap2/built-in.o:(.data+0x154e0): undefined reference to `omap4430_phy_init'
> mach-omap2/built-in.o:(.data+0x154e4): undefined reference to `omap4430_phy_exit'
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This should be OK for now:
Acked-by: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/mach-omap2/Makefile | 8 +++-----
> 1 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index f343365..dc36bd4 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -242,12 +242,9 @@ obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \
> obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
> hsmmc.o
> obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o \
> - hsmmc.o \
> - omap_phy_internal.o
> + hsmmc.o
> obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o \
> - hsmmc.o \
> - omap_phy_internal.o
> -
> + hsmmc.o
> obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o \
> omap_phy_internal.o \
>
> @@ -275,6 +272,7 @@ obj-y += $(smc91x-m) $(smc91x-y)
> smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o
> obj-y += $(smsc911x-m) $(smsc911x-y)
> obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o
> +obj-$(CONFIG_ARCH_OMAP4) += omap_phy_internal.o
>
> disp-$(CONFIG_OMAP2_DSS) := display.o
> obj-y += $(disp-m) $(disp-y)
> --
> 1.7.5.4
>
^ permalink raw reply
* [PATCH 13/30] ARM: omap2+: fix omap_hdq_init compilation
From: Tony Lindgren @ 2011-10-03 18:06 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4E8943EA.5060205@ti.com>
* Santosh Shilimkar <santosh.shilimkar@ti.com> [111002 21:37]:
> On Sunday 02 October 2011 08:15 PM, Arnd Bergmann wrote:
> > The definition of the device must depend on the hardware
> > we run on, not on the kernel configuration.
> >
> > arch/arm/mach-omap2/devices.c:624:13: error: 'OMAP_HDQ_BASE' undeclared here (not in a function)
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply
* [PATCH 17/30] usb/musb: allow building USB_MUSB_TUSB6010 as a module
From: Tony Lindgren @ 2011-10-03 18:14 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317566760-25681-18-git-send-email-arnd@arndb.de>
* Arnd Bergmann <arnd@arndb.de> [111002 07:13]:
> Commit 1376d92f9 "usb: musb: allow musb and glue layers to be modules"
> made the USB_MUSB_TUSB6010 option modular, but actually building
> the driver as a module does not work, so various randconfig builds
> actually fail. This changes all code that depends on the
> option to also check for modular builds, and exports the necessary
> symbols.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Felipe Balbi <balbi@ti.com>
I guess the tusb_get_revision could also be an inline function
in tusb6010.h if we wanted to avoid that EXPORT_SYMBOL. Anyways:
Acked-by: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/mach-omap2/board-n8x0.c | 2 +-
> drivers/usb/musb/musb_core.c | 3 ++-
> drivers/usb/musb/musb_io.h | 2 +-
> drivers/usb/musb/tusb6010.c | 1 +
> 4 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
> index 403325d..c096dc2 100644
> --- a/arch/arm/mach-omap2/board-n8x0.c
> +++ b/arch/arm/mach-omap2/board-n8x0.c
> @@ -46,7 +46,7 @@ static struct device *mmc_device;
> #define TUSB6010_GPIO_ENABLE 0
> #define TUSB6010_DMACHAN 0x3f
>
> -#ifdef CONFIG_USB_MUSB_TUSB6010
> +#if defined(CONFIG_USB_MUSB_TUSB6010) || defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
> /*
> * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and
> * 1.5 V voltage regulators of PM companion chip. Companion chip will then
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index 20a2873..9fa2596 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -1432,7 +1432,7 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
> struct musb_hw_ep *hw_ep = musb->endpoints + i;
>
> hw_ep->fifo = MUSB_FIFO_OFFSET(i) + mbase;
> -#ifdef CONFIG_USB_MUSB_TUSB6010
> +#if defined(CONFIG_USB_MUSB_TUSB6010) || defined (CONFIG_USB_MUSB_TUSB6010_MODULE)
> hw_ep->fifo_async = musb->async + 0x400 + MUSB_FIFO_OFFSET(i);
> hw_ep->fifo_sync = musb->sync + 0x400 + MUSB_FIFO_OFFSET(i);
> hw_ep->fifo_sync_va =
> @@ -1632,6 +1632,7 @@ void musb_dma_completion(struct musb *musb, u8 epnum, u8 transmit)
> }
> }
> }
> +EXPORT_SYMBOL_GPL(musb_dma_completion);
>
> #else
> #define use_dma 0
> diff --git a/drivers/usb/musb/musb_io.h b/drivers/usb/musb/musb_io.h
> index 03c6ccd..e61aa95 100644
> --- a/drivers/usb/musb/musb_io.h
> +++ b/drivers/usb/musb/musb_io.h
> @@ -74,7 +74,7 @@ static inline void musb_writel(void __iomem *addr, unsigned offset, u32 data)
> { __raw_writel(data, addr + offset); }
>
>
> -#ifdef CONFIG_USB_MUSB_TUSB6010
> +#if defined(CONFIG_USB_MUSB_TUSB6010) || defined (CONFIG_USB_MUSB_TUSB6010_MODULE)
>
> /*
> * TUSB6010 doesn't allow 8-bit access; 16-bit access is the minimum.
> diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
> index ec14801..1f40561 100644
> --- a/drivers/usb/musb/tusb6010.c
> +++ b/drivers/usb/musb/tusb6010.c
> @@ -56,6 +56,7 @@ u8 tusb_get_revision(struct musb *musb)
>
> return rev;
> }
> +EXPORT_SYMBOL_GPL(tusb_get_revision);
>
> static int tusb_print_revision(struct musb *musb)
> {
> --
> 1.7.5.4
>
^ permalink raw reply
* [PATCH 23/30] ARM: omap2: select twl4030 support on boards that need it
From: Tony Lindgren @ 2011-10-03 18:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317566760-25681-24-git-send-email-arnd@arndb.de>
* Arnd Bergmann <arnd@arndb.de> [111002 07:13]:
> These three boards unconditionally use the twl4030 driver
> from the board-zoom-display.c file. Make sure that the driver
> is always there.
> We also need to select the I2C core so we are able to build
> that driver.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/mach-omap2/Kconfig | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> index 57b66d5..4deeade 100644
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -253,6 +253,8 @@ config MACH_OMAP_ZOOM2
> select SERIAL_CORE_CONSOLE
> select SERIAL_8250_CONSOLE
> select REGULATOR_FIXED_VOLTAGE
> + select TWL4030_CORE
> + select I2C
>
> config MACH_OMAP_ZOOM3
> bool "OMAP3630 Zoom3 board"
> @@ -263,6 +265,8 @@ config MACH_OMAP_ZOOM3
> select SERIAL_CORE_CONSOLE
> select SERIAL_8250_CONSOLE
> select REGULATOR_FIXED_VOLTAGE
> + select TWL4030_CORE
> + select I2C
>
> config MACH_CM_T35
> bool "CompuLab CM-T35/CM-T3730 modules"
> @@ -304,6 +308,8 @@ config MACH_OMAP_3630SDP
> depends on ARCH_OMAP3
> default y
> select OMAP_PACKAGE_CBP
> + select TWL4030_CORE
> + select I2C
>
> config MACH_TI8168EVM
> bool "TI8168 Evaluation Module"
> --
> 1.7.5.4
>
^ permalink raw reply
* [PATCH 24/30] ARM: omap2+: ensure that one of omap2/3/4 is selected
From: Tony Lindgren @ 2011-10-03 18:21 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4E89462D.7010208@ti.com>
* Santosh Shilimkar <santosh.shilimkar@ti.com> [111002 21:46]:
> On Sunday 02 October 2011 08:15 PM, Arnd Bergmann wrote:
> > Random configurations can fail if none of the omap families
> > in mach-omap2 is selected. This patch automatically selects
> > omap2 if the user has not made any other choice.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
>
> OMAP4 would have been a better default but am fine with
> OMAP2 too.
>
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Hmm yeah then that would mean constant patching for the
latest omap.. So OMAP2 here makes the fastest build and
avoids having to update it on regular basis.
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply
* [PATCH 25/30] ARM: OMAP depends on MMU
From: Tony Lindgren @ 2011-10-03 18:22 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4E894664.5090609@ti.com>
* Santosh Shilimkar <santosh.shilimkar@ti.com> [111002 21:47]:
> On Sunday 02 October 2011 08:15 PM, Arnd Bergmann wrote:
> > There is no way to build OMAP kernels without an MMU
> > at this point because of dependencies on MMU-only functions.
> >
> > As long as nobody is interested in fixing this, let's just disable
> > this platforms for nommu kernels.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
This should be fine for now:
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply
* [PATCH 26/30] ARM: omap: add board autoselection
From: Tony Lindgren @ 2011-10-03 18:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <5055144.Y0IUdMEWXQ@wuerfel>
* Arnd Bergmann <arnd@arndb.de> [111003 02:20]:
> On Monday 03 October 2011 11:27:44 Cousson, Benoit wrote:
> > >
> > > In the long run, I'd hope we can just get rid of these for subarchitectures
> > > that support device tree probing and make the device tree based machine
> > > description unconditional.
> >
> > This is really our goal, we will have soon the board-generic.c for that,
> > someone will just have to migrate these ~30 board files to device tree
> > DTS files
>
> For the purpose of build-time validation using randconfig, there is no
> problem in keeping some board files forever, as long as the generic board
> file is always built-in.
Yes please leave out the list so we don't need to constantly update it.
Let's just always build in MACH_OMAP_GENERIC.
Regards,
Tony
^ permalink raw reply
* [PATCH 27/30] ARM: omap: select L2X0 cache on omap4
From: Tony Lindgren @ 2011-10-03 18:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4E89481C.4070405@ti.com>
* Santosh Shilimkar <santosh.shilimkar@ti.com> [111002 21:55]:
> On Sunday 02 October 2011 08:15 PM, Arnd Bergmann wrote:
> > The cache controller needs to be enabled for the
> > cortex-a9 specific errata that are also selected
> > to work.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply
* [PATCH 29/30] ARM: omap: select USB_ARCH_HAS_EHCI only when USB is enabled
From: Tony Lindgren @ 2011-10-03 18:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1317566760-25681-30-git-send-email-arnd@arndb.de>
* Arnd Bergmann <arnd@arndb.de> [111002 07:13]:
> This avoids a warning from Kconfig about missing dependencies.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/mach-omap2/Kconfig | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> index 3921a95..fdd45dd 100644
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -32,7 +32,7 @@ config ARCH_OMAP3
> depends on ARCH_OMAP2PLUS
> default y
> select CPU_V7
> - select USB_ARCH_HAS_EHCI
> + select USB_ARCH_HAS_EHCI if USB_SUPPORT
> select ARM_L1_CACHE_SHIFT_6 if !ARCH_OMAP4
> select ARCH_HAS_OPP
> select PM_OPP if PM
> @@ -50,7 +50,7 @@ config ARCH_OMAP4
> select CACHE_L2X0
> select ARCH_HAS_OPP
> select PM_OPP if PM
> - select USB_ARCH_HAS_EHCI
> + select USB_ARCH_HAS_EHCI if USB_SUPPORT
>
> config ARCH_OMAP2_AUTO
> bool
> --
> 1.7.5.4
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox