Skip to contentSkip to conversation

Initial Calxeda Highbank support

PATCH Superseded Rob Herring 5 participants 18 messages Sep 1, 2011 – Oct 7, 2011

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover Initial Calxeda Highbank support

From: Rob Herring <[email protected]>

This adds initial platform support for Calxeda's Highbank ARM SOC including SMP, hotplug, and suspend support. One new patch to add empty version of l2x0_of_init. Changes for v2 are listed in each patch.

Based on rmk's for-next branch with gpio.h and io.h clean-ups plus previously posted GIC devicetree binding support. The GIC patches are here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/060570.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/060790.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/062735.html

Rob

Martin Bogomolni (1):
ARM: highbank: Add cpu hotplug support

Rob Herring (6):
ARM: l2x0: add empty l2x0_of_init
ARM: highbank: add devicetree source
ARM: add Highbank core platform support
MAINTAINERS: add Calxeda Highbank ARM platform
ARM: highbank: add SMP support
ARM: highbank: add suspend support

 Documentation/devicetree/bindings/arm/calxeda.txt |    8 +
 MAINTAINERS                                       |    6 +
 arch/arm/Kconfig                                  |   18 ++-
 arch/arm/Makefile                                 |    1 +
 arch/arm/boot/dts/highbank.dts                    |  224 +++++++++++++++++++++
 arch/arm/include/asm/hardware/cache-l2x0.h        |    7 +
 arch/arm/mach-highbank/Makefile                   |    6 +
 arch/arm/mach-highbank/Makefile.boot              |    1 +
 arch/arm/mach-highbank/clock.c                    |   62 ++++++
 arch/arm/mach-highbank/core.h                     |    9 +
 arch/arm/mach-highbank/highbank.c                 |  150 ++++++++++++++
 arch/arm/mach-highbank/hotplug.c                  |   56 +++++
 arch/arm/mach-highbank/include/mach/debug-macro.S |   19 ++
 arch/arm/mach-highbank/include/mach/entry-macro.S |    7 +
 arch/arm/mach-highbank/include/mach/gpio.h        |    1 +
 arch/arm/mach-highbank/include/mach/io.h          |    7 +
 arch/arm/mach-highbank/include/mach/irqs.h        |    6 +
 arch/arm/mach-highbank/include/mach/memory.h      |    1 +
 arch/arm/mach-highbank/include/mach/system.h      |   26 +++
 arch/arm/mach-highbank/include/mach/timex.h       |    6 +
 arch/arm/mach-highbank/include/mach/uncompress.h  |    9 +
 arch/arm/mach-highbank/include/mach/vmalloc.h     |    6 +
 arch/arm/mach-highbank/lluart.c                   |   34 +++
 arch/arm/mach-highbank/localtimer.c               |   38 ++++
 arch/arm/mach-highbank/platsmp.c                  |   78 +++++++
 arch/arm/mach-highbank/pm.c                       |   55 +++++
 arch/arm/mach-highbank/sysregs.h                  |   52 +++++
 arch/arm/mach-highbank/system.c                   |   33 +++
 arch/arm/mm/Kconfig                               |    2 +-
 29 files changed, 926 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/calxeda.txt
 create mode 100644 arch/arm/boot/dts/highbank.dts
 create mode 100644 arch/arm/mach-highbank/Makefile
 create mode 100644 arch/arm/mach-highbank/Makefile.boot
 create mode 100644 arch/arm/mach-highbank/clock.c
 create mode 100644 arch/arm/mach-highbank/core.h
 create mode 100644 arch/arm/mach-highbank/highbank.c
 create mode 100644 arch/arm/mach-highbank/hotplug.c
 create mode 100644 arch/arm/mach-highbank/include/mach/debug-macro.S
 create mode 100644 arch/arm/mach-highbank/include/mach/entry-macro.S
 create mode 100644 arch/arm/mach-highbank/include/mach/gpio.h
 create mode 100644 arch/arm/mach-highbank/include/mach/io.h
 create mode 100644 arch/arm/mach-highbank/include/mach/irqs.h
 create mode 100644 arch/arm/mach-highbank/include/mach/memory.h
 create mode 100644 arch/arm/mach-highbank/include/mach/system.h
 create mode 100644 arch/arm/mach-highbank/include/mach/timex.h
 create mode 100644 arch/arm/mach-highbank/include/mach/uncompress.h
 create mode 100644 arch/arm/mach-highbank/include/mach/vmalloc.h
 create mode 100644 arch/arm/mach-highbank/lluart.c
 create mode 100644 arch/arm/mach-highbank/localtimer.c
 create mode 100644 arch/arm/mach-highbank/platsmp.c
 create mode 100644 arch/arm/mach-highbank/pm.c
 create mode 100644 arch/arm/mach-highbank/sysregs.h
 create mode 100644 arch/arm/mach-highbank/system.c
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v2 1/7 ARM: l2x0: add empty l2x0_of_init

From: Rob Herring <[email protected]>

Add empty version of l2x0_of_init for when CONFIG_CACHE_L2X0 is not selected.

---
 arch/arm/include/asm/hardware/cache-l2x0.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/include/asm/hardware/cache-l2x0.h +7 -0
index 4a6004a..967a808 100644
@@ -90,7 +90,14 @@
 
 #ifndef __ASSEMBLY__
 extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask);
+#if defined(CONFIG_CACHE_L2X0) && defined(CONFIG_OF)
 extern int l2x0_of_init(__u32 aux_val, __u32 aux_mask);
+#else
+static int l2x0_of_init(__u32 aux_val, __u32 aux_mask)
+{
+	return -ENODEV;
+}
 #endif
+#endif /* __ASSEMBLY__ */
 
 #endif
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 1/7 ARM: l2x0: add empty l2x0_of_init

2011/9/1 Rob Herring <[email protected]>:

Quoted 5 lines

From: Rob Herring <[email protected]>

Add empty version of l2x0_of_init for when CONFIG_CACHE_L2X0 is not selected.

it seems most people use
"
#ifdef CONFIG_CACHE_L2X0
...
l2x0 related codes
...
#endif
"
or
"
obj-$(CONFIG_CACHE_L2X0) += xxx-l2x0.o
"

to avoid l2x0 related codes compiled and linked into kernel.

but this patch provides another option. it is not bad too.

Quoted 22 lines

---
?arch/arm/include/asm/hardware/cache-l2x0.h | ? ?7 +++++++ ?1 files changed, 7 insertions(+), 0 deletions(-)

arch/arm/include/asm/hardware/cache-l2x0.h +0 -0
index 4a6004a..967a808 100644
@@ -90,7 +90,14 @@
 

?#ifndef __ASSEMBLY__
?extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask); +#if defined(CONFIG_CACHE_L2X0) && defined(CONFIG_OF)
?extern int l2x0_of_init(__u32 aux_val, __u32 aux_mask);

arch/arm/include/asm/hardware/cache-l2x0.h +5 -0
+#else
+static int l2x0_of_init(__u32 aux_val, __u32 aux_mask)
+{
+ ? ? ? return -ENODEV;
+}

?#endif
+#endif /* __ASSEMBLY__ */

Quoted 3 lines

?#endif
--
1.7.4.1

-barry

#3 lore raw

PATCH v2 1/7 ARM: l2x0: add empty l2x0_of_init

Barry,

Quoted 9 lines · Barry Song

2011/9/1 Rob Herring <[email protected]>:

Quoted 5 lines

From: Rob Herring <[email protected]>

Add empty version of l2x0_of_init for when CONFIG_CACHE_L2X0 is not selected.

Thanks.

Quoted 13 lines

it seems most people use
"
#ifdef CONFIG_CACHE_L2X0
...
l2x0 related codes
...
#endif
"
or
"
obj-$(CONFIG_CACHE_L2X0) += xxx-l2x0.o
"

Quoted 4 lines

to avoid l2x0 related codes compiled and linked into kernel.

but this patch provides another option. it is not bad too.

The difference with existing platforms and l2x0_init is the ioremap or static mapping and latency register setup for pl310 is outside the function, so you still need an ifdef around all that. With l2x0_of_init, all the setup is done inside the function, so having an empty version is useful.

Rob

#4 lore raw

PATCH v2 2/7 ARM: highbank: add devicetree source

In reply to Rob Herring

From: Rob Herring <[email protected]>

This adds the devicetree source and documentation for the Calxeda highbank platform.

---
Changes in v2:
- Change gic interrupt-cell size to 2 and update entries to high level triggered.

 Documentation/devicetree/bindings/arm/calxeda.txt |    8 +
 arch/arm/boot/dts/highbank.dts                    |  224 +++++++++++++++++++++
 2 files changed, 232 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/calxeda.txt
 create mode 100644 arch/arm/boot/dts/highbank.dts
Documentation/devicetree/bindings/arm/calxeda.txt new file +8 -0
new file mode 100644
index 0000000..4755caa
@@ -0,0 +1,8 @@
+Calxeda Highbank Platforms Device Tree Bindings
+-----------------------------------------------
+
+Boards with Calxeda Cortex-A9 based Highbank SOC shall have the following
+properties.
+
+Required root node properties:
+    - compatible = "calxeda,highbank";
arch/arm/boot/dts/highbank.dts new file +224 -0

224 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#5 lore raw

PATCH v2 3/7 ARM: add Highbank core platform support

In reply to Rob Herring

From: Rob Herring <[email protected]>

This adds basic support for the Calxeda Highbank platform.

---
Changes in v2:
- s/a9_base_addr/scu_base_addr/
- Move DEBUG_LL io mapping to lluart.c
- Convert direct sysregs accesses to inline helper functions
- drop gpio interrupt mapping for now
- Remove IO_SPACE_LIMIT and fix warnings from inb, outb, etc. due parameter being unused in __io
- sort Kconfig select entries
- Add WARN_ON for ioremap failures
- drop unneeded include from entry-macro.S
- remove #ifdef around l2x0_of_init
- Add "/* empty */" to empty headers

 arch/arm/Kconfig                                  |   16 +++
 arch/arm/Makefile                                 |    1 +
 arch/arm/mach-highbank/Makefile                   |    2 +
 arch/arm/mach-highbank/Makefile.boot              |    1 +
 arch/arm/mach-highbank/clock.c                    |   62 +++++++++
 arch/arm/mach-highbank/core.h                     |    9 ++
 arch/arm/mach-highbank/highbank.c                 |  150 +++++++++++++++++++++
 arch/arm/mach-highbank/include/mach/debug-macro.S |   19 +++
 arch/arm/mach-highbank/include/mach/entry-macro.S |    7 +
 arch/arm/mach-highbank/include/mach/gpio.h        |    1 +
 arch/arm/mach-highbank/include/mach/io.h          |    7 +
 arch/arm/mach-highbank/include/mach/irqs.h        |    6 +
 arch/arm/mach-highbank/include/mach/memory.h      |    1 +
 arch/arm/mach-highbank/include/mach/system.h      |   26 ++++
 arch/arm/mach-highbank/include/mach/timex.h       |    6 +
 arch/arm/mach-highbank/include/mach/uncompress.h  |    9 ++
 arch/arm/mach-highbank/include/mach/vmalloc.h     |    6 +
 arch/arm/mach-highbank/lluart.c                   |   34 +++++
 arch/arm/mach-highbank/sysregs.h                  |   52 +++++++
 arch/arm/mach-highbank/system.c                   |   33 +++++
 arch/arm/mm/Kconfig                               |    2 +-
 21 files changed, 449 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-highbank/Makefile
 create mode 100644 arch/arm/mach-highbank/Makefile.boot
 create mode 100644 arch/arm/mach-highbank/clock.c
 create mode 100644 arch/arm/mach-highbank/core.h
 create mode 100644 arch/arm/mach-highbank/highbank.c
 create mode 100644 arch/arm/mach-highbank/include/mach/debug-macro.S
 create mode 100644 arch/arm/mach-highbank/include/mach/entry-macro.S
 create mode 100644 arch/arm/mach-highbank/include/mach/gpio.h
 create mode 100644 arch/arm/mach-highbank/include/mach/io.h
 create mode 100644 arch/arm/mach-highbank/include/mach/irqs.h
 create mode 100644 arch/arm/mach-highbank/include/mach/memory.h
 create mode 100644 arch/arm/mach-highbank/include/mach/system.h
 create mode 100644 arch/arm/mach-highbank/include/mach/timex.h
 create mode 100644 arch/arm/mach-highbank/include/mach/uncompress.h
 create mode 100644 arch/arm/mach-highbank/include/mach/vmalloc.h
 create mode 100644 arch/arm/mach-highbank/lluart.c
 create mode 100644 arch/arm/mach-highbank/sysregs.h
 create mode 100644 arch/arm/mach-highbank/system.c
arch/arm/Kconfig +16 -0
index 63cbd86..9019a56 100644
@@ -314,6 +314,22 @@ config ARCH_BCMRING
 	help
 	  Support for Broadcom's BCMRing platform.
 
+config ARCH_HIGHBANK
+	bool "Calxeda Highbank-based"
+	select ARCH_WANT_OPTIONAL_GPIOLIB
+	select ARM_AMBA
+	select ARM_GIC
+	select ARM_PATCH_PHYS_VIRT
+	select ARM_TIMER_SP804
+	select AUTO_ZRELADDR
+	select CLKDEV_LOOKUP
+	select CPU_V7
+	select GENERIC_CLOCKEVENTS
+	select HAVE_ARM_SCU
+	select USE_OF
+	help
+	  Support for the Calxeda Highbank SoC based boards.
+
 config ARCH_CLPS711X
 	bool "Cirrus Logic CLPS711x/EP721x-based"
 	select CPU_ARM720T
arch/arm/Makefile +1 -0
index 5665c2a..98c3c22 100644
@@ -144,6 +144,7 @@ machine-$(CONFIG_ARCH_EBSA110)		:= ebsa110
 machine-$(CONFIG_ARCH_EP93XX)		:= ep93xx
 machine-$(CONFIG_ARCH_GEMINI)		:= gemini
 machine-$(CONFIG_ARCH_H720X)		:= h720x
+machine-$(CONFIG_ARCH_HIGHBANK)		:= highbank
 machine-$(CONFIG_ARCH_INTEGRATOR)	:= integrator
 machine-$(CONFIG_ARCH_IOP13XX)		:= iop13xx
 machine-$(CONFIG_ARCH_IOP32X)		:= iop32x
arch/arm/mach-highbank/Makefile new file +2 -0
new file mode 100644
index 0000000..11d4010
@@ -0,0 +1,2 @@
+obj-y					:= clock.o highbank.o system.o
+obj-$(CONFIG_DEBUG_LL)			+= lluart.o
arch/arm/mach-highbank/Makefile.boot new file +1 -0
new file mode 100644
index 0000000..dae9661
@@ -0,0 +1 @@
+zreladdr-y	:= 0x00008000
arch/arm/mach-highbank/clock.c new file +62 -0

62 lines not on this page · raw message

arch/arm/mach-highbank/core.h new file +9 -0
new file mode 100644
index 0000000..9df3fc7
@@ -0,0 +1,9 @@
+extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
+extern void highbank_clocks_init(void);
+extern void __iomem *scu_base_addr;
+#ifdef CONFIG_DEBUG_LL
+extern void highbank_lluart_map_io(void);
+#else
+static inline void highbank_lluart_map_io(void) {}
+#endif
+
arch/arm/mach-highbank/highbank.c new file +150 -0

150 lines not on this page · raw message

arch/arm/mach-highbank/include/mach/debug-macro.S new file +19 -0
new file mode 100644
index 0000000..2f3e344
@@ -0,0 +1,19 @@
+/*
+ * Debugging macro include header
+ *
+ *  Copyright (C) 1994-1999 Russell King
+ *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
+ *
+ * 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.
+ */
+
+		.macro	addruart,rp,rv
+		movw	\rv, #0x6000
+		movt	\rv, #0xfee3
+		movw	\rp, #0x6000
+		movt	\rp, #0xfff3
+		.endm
+
+#include <asm/hardware/debug-pl01x.S>
arch/arm/mach-highbank/include/mach/entry-macro.S new file +7 -0
new file mode 100644
index 0000000..73c1129
@@ -0,0 +1,7 @@
+#include <asm/hardware/entry-macro-gic.S>
+
+	.macro	disable_fiq
+	.endm
+
+	.macro	arch_ret_to_user, tmp1, tmp2
+	.endm
arch/arm/mach-highbank/include/mach/gpio.h new file +1 -0
new file mode 100644
index 0000000..40a8c17
@@ -0,0 +1 @@
+/* empty */
arch/arm/mach-highbank/include/mach/io.h new file +7 -0
new file mode 100644
index 0000000..70cfa3b
@@ -0,0 +1,7 @@
+#ifndef __MACH_IO_H
+#define __MACH_IO_H
+
+#define __io(a)		({ (void)(a); __typesafe_io(0); })
+#define __mem_pci(a)	(a)
+
+#endif
arch/arm/mach-highbank/include/mach/irqs.h new file +6 -0
new file mode 100644
index 0000000..9746aab
@@ -0,0 +1,6 @@
+#ifndef __MACH_IRQS_H
+#define __MACH_IRQS_H
+
+#define NR_IRQS			192
+
+#endif
arch/arm/mach-highbank/include/mach/memory.h new file +1 -0
new file mode 100644
index 0000000..40a8c17
@@ -0,0 +1 @@
+/* empty */
arch/arm/mach-highbank/include/mach/system.h new file +26 -0
new file mode 100644
index 0000000..7e81922
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2010-2011 Calxeda, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef __MACH_SYSTEM_H
+#define __MACH_SYSTEM_H
+
+static inline void arch_idle(void)
+{
+	cpu_do_idle();
+}
+
+extern void arch_reset(char mode, const char *cmd);
+
+#endif
arch/arm/mach-highbank/include/mach/timex.h new file +6 -0
new file mode 100644
index 0000000..88dac7a
@@ -0,0 +1,6 @@
+#ifndef __MACH_TIMEX_H
+#define __MACH_TIMEX_H
+
+#define CLOCK_TICK_RATE		1000000
+
+#endif
arch/arm/mach-highbank/include/mach/uncompress.h new file +9 -0
new file mode 100644
index 0000000..bbe20e6
@@ -0,0 +1,9 @@
+#ifndef __MACH_UNCOMPRESS_H
+#define __MACH_UNCOMPRESS_H
+
+#define putc(c)
+#define flush()
+#define arch_decomp_setup()
+#define arch_decomp_wdog()
+
+#endif
arch/arm/mach-highbank/include/mach/vmalloc.h new file +6 -0
new file mode 100644
index 0000000..1a3e398
@@ -0,0 +1,6 @@
+#ifndef __MACH_VMALLOC_H
+#define __MACH_VMALLOC_H
+
+#define VMALLOC_END		0xFEE00000UL
+
+#endif
arch/arm/mach-highbank/lluart.c new file +34 -0
new file mode 100644
index 0000000..3715750
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2011 Calxeda, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <linux/init.h>
+#include <asm/page.h>
+#include <asm/sizes.h>
+#include <asm/mach/map.h>
+
+#define HB_DEBUG_LL_PHYS_BASE	0xfff36000
+#define HB_DEBUG_LL_VIRT_BASE	0xfee36000
+
+static struct map_desc lluart_io_desc __initdata = {
+	.virtual	= HB_DEBUG_LL_VIRT_BASE,
+	.pfn		= __phys_to_pfn(HB_DEBUG_LL_PHYS_BASE),
+	.length		= SZ_4K,
+	.type		= MT_DEVICE,
+};
+
+void __init highbank_lluart_map_io(void)
+{
+	iotable_init(&lluart_io_desc, 1);
+}
arch/arm/mach-highbank/sysregs.h new file +52 -0

52 lines not on this page · raw message

arch/arm/mach-highbank/system.c new file +33 -0
new file mode 100644
index 0000000..53f0c4c
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2011 Calxeda, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <linux/io.h>
+#include <asm/smp_scu.h>
+#include <asm/proc-fns.h>
+
+#include "core.h"
+#include "sysregs.h"
+
+void arch_reset(char mode, const char *cmd)
+{
+	if (mode == 'h')
+		hignbank_set_pwr_hard_reset();
+	else
+		hignbank_set_pwr_soft_reset();
+
+	scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);
+	cpu_do_idle();
+}
+
arch/arm/mm/Kconfig +1 -1
index 88633fe..7d5fff7 100644
@@ -822,7 +822,7 @@ config CACHE_L2X0
 		   REALVIEW_EB_A9MP || SOC_IMX35 || SOC_IMX31 || MACH_REALVIEW_PBX || \
 		   ARCH_NOMADIK || ARCH_OMAP4 || ARCH_EXYNOS4 || ARCH_TEGRA || \
 		   ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_SHMOBILE || \
-		   ARCH_PRIMA2 || ARCH_ZYNQ || ARCH_CNS3XXX
+		   ARCH_PRIMA2 || ARCH_ZYNQ || ARCH_CNS3XXX || ARCH_HIGHBANK
 	default y
 	select OUTER_CACHE
 	select OUTER_CACHE_SYNC
Signature · 1 line
1.7.4.1
#6 lore raw

PATCH v2 4/7 MAINTAINERS: add Calxeda Highbank ARM platform

In reply to Rob Herring

From: Rob Herring <[email protected]>

Adding maintainer for arch/arm/mach-highbank/

---
 MAINTAINERS |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
MAINTAINERS +6 -0
index 1a8cc60..6c036ea 100644
@@ -688,6 +688,12 @@ F:	drivers/mtd/nand/bcm_umi_nand.c
 F:	drivers/mtd/nand/bcm_umi_bch.c
 F:	drivers/mtd/nand/nand_bcm_umi.h
 
+ARM/CALXEDA HIGHBANK ARCHITECTURE
+M:	Rob Herring <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
+S:	Maintained
+F:	arch/arm/mach-highbank/
+
 ARM/CAVIUM NETWORKS CNS3XXX MACHINE SUPPORT
 M:	Anton Vorontsov <[email protected]>
 S:	Maintained
Signature · 1 line
1.7.4.1
#7 lore raw

PATCH v2 5/7 ARM: highbank: add SMP support

In reply to Rob Herring

From: Rob Herring <[email protected]>

This enables SMP support on highbank processor.

---
Changes in v2:
- drop NULL check of scu_base
- use IPI #0 instead of #1 to boot secondary
- s/a9_base_addr/scu_base_addr/
- fix muliple mapping of twd registers

 arch/arm/Kconfig                    |    2 +-
 arch/arm/mach-highbank/Makefile     |    2 +
 arch/arm/mach-highbank/localtimer.c |   38 +++++++++++++++++
 arch/arm/mach-highbank/platsmp.c    |   78 +++++++++++++++++++++++++++++++++++
 4 files changed, 119 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-highbank/localtimer.c
 create mode 100644 arch/arm/mach-highbank/platsmp.c
arch/arm/Kconfig +1 -1
index 9019a56..6d2add5 100644
@@ -1372,7 +1372,7 @@ config SMP
 	depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \
 		 MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \
 		 ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \
-		 ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE
+		 ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE || ARCH_HIGHBANK
 	select USE_GENERIC_SMP_HELPERS
 	select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP
 	help
arch/arm/mach-highbank/Makefile +2 -0
index 11d4010..311c0e8e 100644
@@ -1,2 +1,4 @@
 obj-y					:= clock.o highbank.o system.o
 obj-$(CONFIG_DEBUG_LL)			+= lluart.o
+obj-$(CONFIG_SMP)			+= platsmp.o
+obj-$(CONFIG_LOCAL_TIMERS)		+= localtimer.o
arch/arm/mach-highbank/localtimer.c new file +38 -0
new file mode 100644
index 0000000..344ea29
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2010-2011 Calxeda, Inc.
+ * Based on localtimer.c, Copyright (C) 2002 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <linux/init.h>
+#include <linux/clockchips.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
+
+#include <asm/smp_twd.h>
+
+/*
+ * Setup the local clock events for a CPU.
+ */
+int __cpuinit local_timer_setup(struct clock_event_device *evt)
+{
+	struct device_node *np;
+
+	np = of_find_compatible_node(NULL, NULL, "arm,smp-twd");
+	if (!twd_base)
+		twd_base = of_iomap(np, 0);
+	evt->irq = irq_of_parse_and_map(np, 0);
+	twd_timer_setup(evt);
+	return 0;
+}
arch/arm/mach-highbank/platsmp.c new file +78 -0

78 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#8 lore raw

PATCH v2 5/7 ARM: highbank: add SMP support

Quoted 72 lines · Rob Herring

From: Rob Herring <[email protected]>

This enables SMP support on highbank processor.

---
Changes in v2:
- drop NULL check of scu_base
- use IPI #0 instead of #1 to boot secondary
- s/a9_base_addr/scu_base_addr/
- fix muliple mapping of twd registers

 arch/arm/Kconfig                    |    2 +-
 arch/arm/mach-highbank/Makefile     |    2 +
 arch/arm/mach-highbank/localtimer.c |   38 +++++++++++++++++
 arch/arm/mach-highbank/platsmp.c    |   78 +++++++++++++++++++++++++++++++++++
 4 files changed, 119 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-highbank/localtimer.c
 create mode 100644 arch/arm/mach-highbank/platsmp.c
arch/arm/Kconfig +1 -1
index 9019a56..6d2add5 100644
@@ -1372,7 +1372,7 @@ config SMP
 	depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \
 		 MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \
 		 ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \
-		 ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE
+		 ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE || ARCH_HIGHBANK
 	select USE_GENERIC_SMP_HELPERS
 	select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP
 	help
arch/arm/mach-highbank/Makefile +2 -0
index 11d4010..311c0e8e 100644
@@ -1,2 +1,4 @@
 obj-y					:= clock.o highbank.o system.o
 obj-$(CONFIG_DEBUG_LL)			+= lluart.o
+obj-$(CONFIG_SMP)			+= platsmp.o
+obj-$(CONFIG_LOCAL_TIMERS)		+= localtimer.o
arch/arm/mach-highbank/localtimer.c new file +24 -0
new file mode 100644
index 0000000..344ea29
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2010-2011 Calxeda, Inc.
+ * Based on localtimer.c, Copyright (C) 2002 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <linux/init.h>
+#include <linux/clockchips.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
+
+#include <asm/smp_twd.h>
+

arch/arm/mach-highbank/localtimer.c line 34

Quoted 10 lines
arch/arm/mach-highbank/localtimer.c new file +10 -0
+/*
+ * Setup the local clock events for a CPU.
+ */
+int __cpuinit local_timer_setup(struct clock_event_device *evt)
+{
+	struct device_node *np;
+
+	np = of_find_compatible_node(NULL, NULL, "arm,smp-twd");
+	if (!twd_base)
+		twd_base = of_iomap(np, 0);

WARN_ON(!twd_base)?

Regards,
Shawn

Quoted 4 lines
arch/arm/mach-highbank/localtimer.c new file +4 -0
+	evt->irq = irq_of_parse_and_map(np, 0);
+	twd_timer_setup(evt);
+	return 0;
+}
#9 lore raw

PATCH v2 5/7 ARM: highbank: add SMP support

Shawn,

Quoted 77 lines · Shawn Guo
Quoted 76 lines · Rob Herring

From: Rob Herring <[email protected]>

This enables SMP support on highbank processor.

---
Changes in v2:
- drop NULL check of scu_base
- use IPI #0 instead of #1 to boot secondary
- s/a9_base_addr/scu_base_addr/
- fix muliple mapping of twd registers

 arch/arm/Kconfig                    |    2 +-
 arch/arm/mach-highbank/Makefile     |    2 +
 arch/arm/mach-highbank/localtimer.c |   38 +++++++++++++++++
 arch/arm/mach-highbank/platsmp.c    |   78 +++++++++++++++++++++++++++++++++++
 4 files changed, 119 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-highbank/localtimer.c
 create mode 100644 arch/arm/mach-highbank/platsmp.c
arch/arm/Kconfig +1 -1
index 9019a56..6d2add5 100644
@@ -1372,7 +1372,7 @@ config SMP
 	depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \
 		 MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \
 		 ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \
-		 ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE
+		 ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE || ARCH_HIGHBANK
 	select USE_GENERIC_SMP_HELPERS
 	select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP
 	help
arch/arm/mach-highbank/Makefile +2 -0
index 11d4010..311c0e8e 100644
@@ -1,2 +1,4 @@
 obj-y					:= clock.o highbank.o system.o
 obj-$(CONFIG_DEBUG_LL)			+= lluart.o
+obj-$(CONFIG_SMP)			+= platsmp.o
+obj-$(CONFIG_LOCAL_TIMERS)		+= localtimer.o
arch/arm/mach-highbank/localtimer.c new file +28 -0
new file mode 100644
index 0000000..344ea29
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2010-2011 Calxeda, Inc.
+ * Based on localtimer.c, Copyright (C) 2002 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <linux/init.h>
+#include <linux/clockchips.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
+
+#include <asm/smp_twd.h>
+
+/*
+ * Setup the local clock events for a CPU.
+ */
+int __cpuinit local_timer_setup(struct clock_event_device *evt)
Quoted 9 lines

arch/arm/mach-highbank/localtimer.c line 34

Quoted 6 lines
arch/arm/mach-highbank/localtimer.c new file +6 -0
+{
+	struct device_node *np;
+
+	np = of_find_compatible_node(NULL, NULL, "arm,smp-twd");
+	if (!twd_base)
+		twd_base = of_iomap(np, 0);

WARN_ON(!twd_base)?

Okay, will add it. Can I add your Reviewed-by for the series?

Rob

#10 lore raw

PATCH v2 5/7 ARM: highbank: add SMP support

Quoted 90 lines · Rob Herring

Shawn,

Quoted 77 lines · Shawn Guo
Quoted 76 lines · Rob Herring

From: Rob Herring <[email protected]>

This enables SMP support on highbank processor.

---
Changes in v2:
- drop NULL check of scu_base
- use IPI #0 instead of #1 to boot secondary
- s/a9_base_addr/scu_base_addr/
- fix muliple mapping of twd registers

 arch/arm/Kconfig                    |    2 +-
 arch/arm/mach-highbank/Makefile     |    2 +
 arch/arm/mach-highbank/localtimer.c |   38 +++++++++++++++++
 arch/arm/mach-highbank/platsmp.c    |   78 +++++++++++++++++++++++++++++++++++
 4 files changed, 119 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-highbank/localtimer.c
 create mode 100644 arch/arm/mach-highbank/platsmp.c
arch/arm/Kconfig +1 -1
index 9019a56..6d2add5 100644
@@ -1372,7 +1372,7 @@ config SMP
 	depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \
 		 MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \
 		 ARCH_EXYNOS4 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || \
-		 ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE
+		 ARCH_MSM_SCORPIONMP || ARCH_SHMOBILE || ARCH_HIGHBANK
 	select USE_GENERIC_SMP_HELPERS
 	select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP
 	help
arch/arm/mach-highbank/Makefile +2 -0
index 11d4010..311c0e8e 100644
@@ -1,2 +1,4 @@
 obj-y					:= clock.o highbank.o system.o
 obj-$(CONFIG_DEBUG_LL)			+= lluart.o
+obj-$(CONFIG_SMP)			+= platsmp.o
+obj-$(CONFIG_LOCAL_TIMERS)		+= localtimer.o
arch/arm/mach-highbank/localtimer.c new file +28 -0
new file mode 100644
index 0000000..344ea29
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2010-2011 Calxeda, Inc.
+ * Based on localtimer.c, Copyright (C) 2002 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <linux/init.h>
+#include <linux/clockchips.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
+
+#include <asm/smp_twd.h>
+
+/*
+ * Setup the local clock events for a CPU.
+ */
+int __cpuinit local_timer_setup(struct clock_event_device *evt)
Quoted 9 lines

arch/arm/mach-highbank/localtimer.c line 34

Quoted 6 lines
arch/arm/mach-highbank/localtimer.c new file +6 -0
+{
+	struct device_node *np;
+
+	np = of_find_compatible_node(NULL, NULL, "arm,smp-twd");
+	if (!twd_base)
+		twd_base = of_iomap(np, 0);

WARN_ON(!twd_base)?

Quoted 2 lines

Okay, will add it. Can I add your Reviewed-by for the series?

Yes, if you'd like to ;)

Signature · 2 lines
Regards,
Shawn
#11 lore raw

PATCH v2 6/7 ARM: highbank: Add cpu hotplug support

In reply to Rob Herring

From: Martin Bogomolni <[email protected]>

This adds cpu hotplug for highbank. On highbank, a core is always reset and boots up the same path as a cold boot.

---
Changes in v2:
- s/a9_base_addr/scu_base_addr/

 arch/arm/mach-highbank/Makefile  |    1 +
 arch/arm/mach-highbank/hotplug.c |   56 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-highbank/hotplug.c
arch/arm/mach-highbank/Makefile +1 -0
index 311c0e8e..df30b0d 100644
@@ -2,3 +2,4 @@ obj-y					:= clock.o highbank.o system.o
 obj-$(CONFIG_DEBUG_LL)			+= lluart.o
 obj-$(CONFIG_SMP)			+= platsmp.o
 obj-$(CONFIG_LOCAL_TIMERS)		+= localtimer.o
+obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
arch/arm/mach-highbank/hotplug.c new file +56 -0

56 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#12 lore raw

PATCH v2 7/7 ARM: highbank: add suspend support

In reply to Rob Herring

From: Rob Herring <[email protected]>

Add the platform suspend ops for highbank.

---
Changes in v2:
- s/a9_base_addr/scu_base_addr/
- use sysregs helper functions
- add __init to highbank_pm_init

 arch/arm/mach-highbank/Makefile |    1 +
 arch/arm/mach-highbank/pm.c     |   55 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-highbank/pm.c
arch/arm/mach-highbank/Makefile +1 -0
index df30b0d..daeb3d8 100644
@@ -3,3 +3,4 @@ obj-$(CONFIG_DEBUG_LL)			+= lluart.o
 obj-$(CONFIG_SMP)			+= platsmp.o
 obj-$(CONFIG_LOCAL_TIMERS)		+= localtimer.o
 obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
+obj-$(CONFIG_PM_SLEEP)			+= pm.o
arch/arm/mach-highbank/pm.c new file +55 -0

55 lines not on this page · raw message

Signature · 1 line
1.7.4.1
#13 lore raw

PATCH v2 7/7 ARM: highbank: add suspend support

Quoted 62 lines · Rob Herring

From: Rob Herring <[email protected]>

Add the platform suspend ops for highbank.

---
Changes in v2:
- s/a9_base_addr/scu_base_addr/
- use sysregs helper functions
- add __init to highbank_pm_init

 arch/arm/mach-highbank/Makefile |    1 +
 arch/arm/mach-highbank/pm.c     |   55 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-highbank/pm.c
arch/arm/mach-highbank/Makefile +1 -0
index df30b0d..daeb3d8 100644
@@ -3,3 +3,4 @@ obj-$(CONFIG_DEBUG_LL)			+= lluart.o
 obj-$(CONFIG_SMP)			+= platsmp.o
 obj-$(CONFIG_LOCAL_TIMERS)		+= localtimer.o
 obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
+obj-$(CONFIG_PM_SLEEP)			+= pm.o
arch/arm/mach-highbank/pm.c new file +31 -0
new file mode 100644
index 0000000..33b3beb
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2011 Calxeda, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/suspend.h>
+
+#include <asm/proc-fns.h>
+#include <asm/smp_scu.h>
+#include <asm/suspend.h>
+
+#include "core.h"
+#include "sysregs.h"
+
+static int highbank_suspend_finish(unsigned long val)
+{
+	cpu_do_idle();
+	return 0;

arch/arm/mach-highbank/pm.c line 41

Quoted 10 lines
arch/arm/mach-highbank/pm.c new file +10 -0
+}
+
+static int highbank_pm_enter(suspend_state_t state)
+{
+	hignbank_set_pwr_suspend();
+	highbank_set_cpu_jump(0, cpu_resume);
+
+	scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);
+	cpu_suspend(0, highbank_suspend_finish);
+

Rob,

Just out of curiosity, how can you resume back without taking care of GIC, L2 and SCU which will lose power during suspend?

Regards,
Shawn

Quoted 18 lines
arch/arm/mach-highbank/pm.c new file +14 -0
+	return 0;
+}
+
+static const struct platform_suspend_ops highbank_pm_ops = {
+	.enter = highbank_pm_enter,
+	.valid = suspend_valid_only_mem,
+};
+
+static int __init highbank_pm_init(void)
+{
+	suspend_set_ops(&highbank_pm_ops);
+	return 0;
+}
+module_init(highbank_pm_init);
Signature · 1 line
1.7.4.1
#14 lore raw

PATCH v2 7/7 ARM: highbank: add suspend support

Shawn,

Quoted 75 lines · Shawn Guo
Quoted 62 lines · Rob Herring

From: Rob Herring <[email protected]>

Add the platform suspend ops for highbank.

---
Changes in v2:
- s/a9_base_addr/scu_base_addr/
- use sysregs helper functions
- add __init to highbank_pm_init

 arch/arm/mach-highbank/Makefile |    1 +
 arch/arm/mach-highbank/pm.c     |   55 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-highbank/pm.c
arch/arm/mach-highbank/Makefile +1 -0
index df30b0d..daeb3d8 100644
@@ -3,3 +3,4 @@ obj-$(CONFIG_DEBUG_LL)			+= lluart.o
 obj-$(CONFIG_SMP)			+= platsmp.o
 obj-$(CONFIG_LOCAL_TIMERS)		+= localtimer.o
 obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
+obj-$(CONFIG_PM_SLEEP)			+= pm.o
arch/arm/mach-highbank/pm.c new file +31 -0
new file mode 100644
index 0000000..33b3beb
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2011 Calxeda, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/suspend.h>
+
+#include <asm/proc-fns.h>
+#include <asm/smp_scu.h>
+#include <asm/suspend.h>
+
+#include "core.h"
+#include "sysregs.h"
+
+static int highbank_suspend_finish(unsigned long val)
+{
+	cpu_do_idle();
+	return 0;

arch/arm/mach-highbank/pm.c line 41

Quoted 10 lines
arch/arm/mach-highbank/pm.c new file +10 -0
+}
+
+static int highbank_pm_enter(suspend_state_t state)
+{
+	hignbank_set_pwr_suspend();
+	highbank_set_cpu_jump(0, cpu_resume);
+
+	scu_power_mode(scu_base_addr, SCU_PM_POWEROFF);
+	cpu_suspend(0, highbank_suspend_finish);
+

Rob,

Quoted 3 lines

Just out of curiosity, how can you resume back without taking care of GIC, L2 and SCU which will lose power during suspend?

They are not powergated yet, so it's really just wfi ATM. The L2 and SCU will be re-initialized by boot code. The GIC will need some save and restore.

Rob

#15 lore raw

v2 cover Initial Calxeda Highbank support

In reply to Rob Herring
Quoted 6 lines · Rob Herring

From: Rob Herring <[email protected]>

This adds initial platform support for Calxeda's Highbank ARM SOC including SMP, hotplug, and suspend support. One new patch to add empty version of l2x0_of_init. Changes for v2 are listed in each patch.

Quoted 6 lines

Based on rmk's for-next branch with gpio.h and io.h clean-ups plus previously posted GIC devicetree binding support. The GIC patches are here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/060570.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/060790.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/062735.html

Nice series!

#16 lore raw

v2 cover Initial Calxeda Highbank support

In reply to Rob Herring

Arnd,

Quoted 72 lines · Rob Herring

From: Rob Herring <[email protected]>

This adds initial platform support for Calxeda's Highbank ARM SOC including SMP, hotplug, and suspend support. One new patch to add empty version of l2x0_of_init. Changes for v2 are listed in each patch.

Based on rmk's for-next branch with gpio.h and io.h clean-ups plus previously posted GIC devicetree binding support. The GIC patches are here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/060570.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/060790.html
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/062735.html

Rob

Martin Bogomolni (1):
ARM: highbank: Add cpu hotplug support

Rob Herring (6):
ARM: l2x0: add empty l2x0_of_init
ARM: highbank: add devicetree source
ARM: add Highbank core platform support
MAINTAINERS: add Calxeda Highbank ARM platform
ARM: highbank: add SMP support
ARM: highbank: add suspend support

 Documentation/devicetree/bindings/arm/calxeda.txt |    8 +
 MAINTAINERS                                       |    6 +
 arch/arm/Kconfig                                  |   18 ++-
 arch/arm/Makefile                                 |    1 +
 arch/arm/boot/dts/highbank.dts                    |  224 +++++++++++++++++++++
 arch/arm/include/asm/hardware/cache-l2x0.h        |    7 +
 arch/arm/mach-highbank/Makefile                   |    6 +
 arch/arm/mach-highbank/Makefile.boot              |    1 +
 arch/arm/mach-highbank/clock.c                    |   62 ++++++
 arch/arm/mach-highbank/core.h                     |    9 +
 arch/arm/mach-highbank/highbank.c                 |  150 ++++++++++++++
 arch/arm/mach-highbank/hotplug.c                  |   56 +++++
 arch/arm/mach-highbank/include/mach/debug-macro.S |   19 ++
 arch/arm/mach-highbank/include/mach/entry-macro.S |    7 +
 arch/arm/mach-highbank/include/mach/gpio.h        |    1 +
 arch/arm/mach-highbank/include/mach/io.h          |    7 +
 arch/arm/mach-highbank/include/mach/irqs.h        |    6 +
 arch/arm/mach-highbank/include/mach/memory.h      |    1 +
 arch/arm/mach-highbank/include/mach/system.h      |   26 +++
 arch/arm/mach-highbank/include/mach/timex.h       |    6 +
 arch/arm/mach-highbank/include/mach/uncompress.h  |    9 +
 arch/arm/mach-highbank/include/mach/vmalloc.h     |    6 +
 arch/arm/mach-highbank/lluart.c                   |   34 +++
 arch/arm/mach-highbank/localtimer.c               |   38 ++++
 arch/arm/mach-highbank/platsmp.c                  |   78 +++++++
 arch/arm/mach-highbank/pm.c                       |   55 +++++
 arch/arm/mach-highbank/sysregs.h                  |   52 +++++
 arch/arm/mach-highbank/system.c                   |   33 +++
 arch/arm/mm/Kconfig                               |    2 +-
 29 files changed, 926 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/calxeda.txt
 create mode 100644 arch/arm/boot/dts/highbank.dts
 create mode 100644 arch/arm/mach-highbank/Makefile
 create mode 100644 arch/arm/mach-highbank/Makefile.boot
 create mode 100644 arch/arm/mach-highbank/clock.c
 create mode 100644 arch/arm/mach-highbank/core.h
 create mode 100644 arch/arm/mach-highbank/highbank.c
 create mode 100644 arch/arm/mach-highbank/hotplug.c
 create mode 100644 arch/arm/mach-highbank/include/mach/debug-macro.S
 create mode 100644 arch/arm/mach-highbank/include/mach/entry-macro.S
 create mode 100644 arch/arm/mach-highbank/include/mach/gpio.h
 create mode 100644 arch/arm/mach-highbank/include/mach/io.h
 create mode 100644 arch/arm/mach-highbank/include/mach/irqs.h
 create mode 100644 arch/arm/mach-highbank/include/mach/memory.h
 create mode 100644 arch/arm/mach-highbank/include/mach/system.h
 create mode 100644 arch/arm/mach-highbank/include/mach/timex.h
Quoted 9 lines
 create mode 100644 arch/arm/mach-highbank/include/mach/uncompress.h
 create mode 100644 arch/arm/mach-highbank/include/mach/vmalloc.h
 create mode 100644 arch/arm/mach-highbank/lluart.c
 create mode 100644 arch/arm/mach-highbank/localtimer.c
 create mode 100644 arch/arm/mach-highbank/platsmp.c
 create mode 100644 arch/arm/mach-highbank/pm.c
 create mode 100644 arch/arm/mach-highbank/sysregs.h
 create mode 100644 arch/arm/mach-highbank/system.c

Any comments on v2?

The GIC binding series seems to be firming up. As myself and several others are dependent on it, I was planning to send both through arm-soc tree as 2 pulls. I also have some dependencies on rmk's tree with l2x0 DT support and mach header clean-ups.

Rob

#17 lore raw

v2 cover Initial Calxeda Highbank support

Quoted 6 lines · Rob Herring

Any comments on v2?

The GIC binding series seems to be firming up. As myself and several others are dependent on it, I was planning to send both through arm-soc tree as 2 pulls. I also have some dependencies on rmk's tree with l2x0 DT support and mach header clean-ups.

Looks all good as far as I can tell. Please send the pull requests.

Arnd