add initial imx6q support
v3 cover add initial imx6q support
This patch series adds the initial support for imx6q, which is a Cortex-A9 Quad Core based SoC.
We chose to add imx6q support into mach-imx other than mach-mx5 or a new mach-mx6, because we intend to merge mach-mx5 into mach-imx, so that we have only mach-imx for imx family.
It's based on v3.1-rc7 with the patches below applied.
* [PATCH v2 0/5] Convert DEBUG_LL UART selection to a Kconfig choice
http://thread.gmane.org/gmane.linux.ports.arm.kernel/129702
* [PATCH v4 2/2] ARM: l2x0: Add OF based initialization
http://article.gmane.org/gmane.linux.kernel/1164401
* [PATCH 1/7] ARM: l2x0: add empty l2x0_of_init
http://article.gmane.org/gmane.linux.ports.arm.kernel/130878
* [PATCH 0/3] GIC OF bindings
http://thread.gmane.org/gmane.linux.drivers.devicetree/8338/
For suspend/resume support, it needs the following extra patches as the prerequisite.
* [PATCH 00/11] Add L2 cache cleaning to generic CPU suspend
http://thread.gmane.org/gmane.linux.ports.arm.kernel/130957/
* [PATCH v2 0/5] CPU PM notifiers
http://thread.gmane.org/gmane.linux.ports.arm.kernel/131212/focus=131353
* [PATCH v2 2/2] ARM: smp_scu: remove __init annotation from scu_enable()
http://permalink.gmane.org/gmane.linux.ports.arm.kernel/131358
Changes since v2:
* Refine the L2 register save/restore implementation per Lorenzo's suggestion
* Rebase to Rob's latest GIC OF bindings series
* Rebase to Sascha's MULTI_IRQ_HANDLER support series
Changes since v1:
* Use the existing IMX_IO_P2V for static mapping
* Fix the MXC_INTERNAL_IRQS breakage introduced by GIC definition
* Retrieve clock frequency for fixed clocks from device tree
* Drop early_initcall from imx_src_init() and call it from imx6q platform initialization
* Use readl_relaxed/writel_relaxed rather than __raw_readl/__raw_writel as suggested by Arnd
* Kill unnecessary imx_local_timer_pre_suspend/resume functions
* Kill Kconfig symbol MACH_IMX6Q
* Rebase to rmk's "Add L2 cache cleaning to generic CPU suspend" series so that we can retain L2 cache with necessary L2 register save/restore across suspend/resume cycle
* Rebase to Rob's new "GIC OF bindings" series
Thanks.
Shawn Guo (6):
arm/imx6q: add device tree source
arm/imx6q: add core definitions and low-level debug uart arm/imx6q: add core drivers clock, gpc, mmdc and src arm/imx6q: add smp and cpu hotplug support arm/imx6q: add device tree machine support arm/imx6q: add suspend/resume support
Documentation/devicetree/bindings/arm/fsl.txt | 6 + arch/arm/Kconfig | 2 +- arch/arm/Kconfig.debug | 7 + arch/arm/Makefile | 1 + arch/arm/boot/dts/imx6q-sabreauto.dts | 82 + arch/arm/boot/dts/imx6q.dtsi | 555 +++++++ arch/arm/mach-imx/Kconfig | 29 +- arch/arm/mach-imx/Makefile | 10 + arch/arm/mach-imx/Makefile.boot | 4 + arch/arm/mach-imx/clock-imx6q.c | 2012 +++++++++++++++++++++++++ arch/arm/mach-imx/gpc.c | 113 ++ arch/arm/mach-imx/head-v7.S | 103 ++ arch/arm/mach-imx/hotplug.c | 44 + arch/arm/mach-imx/lluart.c | 32 + arch/arm/mach-imx/localtimer.c | 35 + arch/arm/mach-imx/mach-imx6q.c | 84 + arch/arm/mach-imx/mmdc.c | 71 + arch/arm/mach-imx/platsmp.c | 85 ++ arch/arm/mach-imx/pm-imx6q.c | 90 ++ arch/arm/mach-imx/src.c | 49 + arch/arm/mm/Kconfig | 2 +- arch/arm/plat-mxc/Kconfig | 5 + arch/arm/plat-mxc/include/mach/common.h | 27 + arch/arm/plat-mxc/include/mach/debug-macro.S | 2 + arch/arm/plat-mxc/include/mach/hardware.h | 6 + arch/arm/plat-mxc/include/mach/irqs.h | 10 +- arch/arm/plat-mxc/include/mach/memory.h | 3 + arch/arm/plat-mxc/include/mach/mx6q.h | 33 + 28 files changed, 3497 insertions(+), 5 deletions(-)
PATCH v3 1/6 arm/imx6q: add device tree source
It adds device tree source and documentation for imx6q platform.
--- Documentation/devicetree/bindings/arm/fsl.txt | 6 + arch/arm/boot/dts/imx6q-sabreauto.dts | 82 ++++ arch/arm/boot/dts/imx6q.dtsi | 555 +++++++++++++++++++++++++ 3 files changed, 643 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/fsl.txt create mode 100644 arch/arm/boot/dts/imx6q-sabreauto.dts create mode 100644 arch/arm/boot/dts/imx6q.dtsi
Documentation/devicetree/bindings/arm/fsl.txt new file +6 -0
@@ -0,0 +1,6 @@ +Freescale i.MX Platforms Device Tree Bindings +----------------------------------------------- + +i.MX6 Quad SABRE Automotive Board +Required root node properties: + - compatible = "fsl,imx6q-sabreauto", "fsl,imx6q";
arch/arm/boot/dts/imx6q-sabreauto.dts new file +82 -0
82 lines not on this page · raw message
arch/arm/boot/dts/imx6q.dtsi new file +555 -0
555 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH v3 2/6 arm/imx6q: add core definitions and low-level debug uart
In reply to Shawn GuoIt adds the core definitions and low-level debug uart support for imx6q.
--- arch/arm/Kconfig | 2 +- arch/arm/Kconfig.debug | 7 +++++ arch/arm/Makefile | 1 + arch/arm/mach-imx/Kconfig | 15 +++++++++++- arch/arm/mach-imx/Makefile | 2 + arch/arm/mach-imx/Makefile.boot | 4 +++ arch/arm/mach-imx/lluart.c | 32 +++++++++++++++++++++++++ arch/arm/plat-mxc/Kconfig | 5 ++++ arch/arm/plat-mxc/include/mach/debug-macro.S | 2 + arch/arm/plat-mxc/include/mach/hardware.h | 6 ++++ arch/arm/plat-mxc/include/mach/irqs.h | 10 ++++++- arch/arm/plat-mxc/include/mach/memory.h | 3 ++ arch/arm/plat-mxc/include/mach/mx6q.h | 33 ++++++++++++++++++++++++++ 13 files changed, 118 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-imx/lluart.c create mode 100644 arch/arm/plat-mxc/include/mach/mx6q.h
arch/arm/Kconfig +1 -1
@@ -1376,7 +1376,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 || SOC_IMX6Q select USE_GENERIC_SMP_HELPERS select HAVE_ARM_SCU if !ARCH_MSM_SCORPIONMP help
arch/arm/Kconfig.debug +7 -0
@@ -155,6 +155,13 @@ choice Say Y here if you want kernel low-level debugging support on i.MX50 or i.MX53. + config DEBUG_IMX6Q_UART + bool "i.MX6Q Debug UART" + depends on SOC_IMX6Q + help + Say Y here if you want kernel low-level debugging support + on i.MX6Q. + config DEBUG_S3C_UART0 depends on PLAT_SAMSUNG bool "Use S3C UART 0 for low-level debug"
arch/arm/Makefile +1 -0
@@ -162,6 +162,7 @@ machine-$(CONFIG_ARCH_MX2) := imx machine-$(CONFIG_ARCH_MX25) := imx machine-$(CONFIG_ARCH_MX3) := imx machine-$(CONFIG_ARCH_MX5) := mx5 +machine-$(CONFIG_ARCH_MX6) := imx machine-$(CONFIG_ARCH_MXS) := mxs machine-$(CONFIG_ARCH_NETX) := netx machine-$(CONFIG_ARCH_NOMADIK) := nomadik
arch/arm/mach-imx/Kconfig +14 -1
@@ -58,7 +58,6 @@ config SOC_IMX35 select ARCH_MX35 select MXC_AVIC - if ARCH_MX1 comment "MX1 platforms:"
@@ -606,3 +605,17 @@ config MACH_VPR200 configurations for the board and its peripherals. endif + +if ARCH_MX6 +comment "i.MX6 family:" + +config SOC_IMX6Q + bool "i.MX6 Quad support" + select ARM_GIC + select CPU_V7 + select USE_OF + + help + This enables support for Freescale i.MX6 Quad processor. + +endif
arch/arm/mach-imx/Makefile +2 -0
@@ -61,3 +61,5 @@ obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o + +obj-$(CONFIG_DEBUG_LL) += lluart.o
arch/arm/mach-imx/Makefile.boot +4 -0
@@ -17,3 +17,7 @@ initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000 zreladdr-$(CONFIG_ARCH_MX3) += 0x80008000 params_phys-$(CONFIG_ARCH_MX3) := 0x80000100 initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000 + +zreladdr-$(CONFIG_SOC_IMX6Q) += 0x10008000 +params_phys-$(CONFIG_SOC_IMX6Q) := 0x10000100 +initrd_phys-$(CONFIG_SOC_IMX6Q) := 0x10800000
arch/arm/mach-imx/lluart.c new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright 2011 Freescale Semiconductor, Inc. +* Copyright 2011 Linaro Ltd. +* +* The code contained herein is licensed under the GNU General Public +* License. You may obtain a copy of the GNU General Public License +* Version 2 or later at the following locations: +* +* http://www.opensource.org/licenses/gpl-license.html +* http://www.gnu.org/copyleft/gpl.html +*/ + +#include <linux/init.h> +#include <asm/page.h> +#include <asm/sizes.h> +#include <asm/mach/map.h> +#include <mach/hardware.h> + +static struct map_desc imx_lluart_desc = { +#ifdef CONFIG_DEBUG_IMX6Q_UART + .virtual =MX6Q_IO_P2V (MX6Q_UART4_BASE_ADDR ), + .pfn =__phys_to_pfn (MX6Q_UART4_BASE_ADDR ), + .length =MX6Q_UART4_SIZE , + .type =MT_DEVICE , +#endif +}; + +void __init imx_lluart_map_io (void ) +{ +if (imx_lluart_desc.virtual) +iotable_init (&imx_lluart_desc,1 ); +}
arch/arm/plat-mxc/Kconfig +5 -0
@@ -48,6 +48,11 @@ config ARCH_MX51 help This enables support for systems based on the Freescale i.MX51 family +config ARCH_MX6 + bool "i.MX6" + help + This enables support for systems based on the Freescale i.MX6 family + endchoice source "arch/arm/mach-imx/Kconfig"
arch/arm/plat-mxc/include/mach/debug-macro.S +2 -0
@@ -24,6 +24,8 @@ #define UART_PADDR MX51_UART1_BASE_ADDR #elif defined (CONFIG_DEBUG_IMX50_IMX53_UART) #define UART_PADDR MX53_UART1_BASE_ADDR +#elif defined (CONFIG_DEBUG_IMX6Q_UART) +#define UART_PADDR MX6Q_UART4_BASE_ADDR #endif #define UART_VADDR IMX_IO_ADDRESS(UART_PADDR)
arch/arm/plat-mxc/include/mach/hardware.h +6 -0
@@ -86,6 +86,11 @@* SPBA0 0x70000000+0x100000 -> 0xf5400000+0x100000 * AIPS1 0x73f00000+0x100000 -> 0xf5700000+0x100000 * AIPS2 0x83f00000+0x100000 -> 0xf4300000+0x100000 +* mx6q: +* SCU 0x00a00000+0x001000 -> 0xf4000000+0x001000 +* CCM 0x020c4000+0x004000 -> 0xf42c4000+0x004000 +* ANATOP 0x020c8000+0x001000 -> 0xf42c8000+0x001000 +* UART4 0x021f0000+0x004000 -> 0xf42f0000+0x004000 */ #define IMX_IO_P2V (x) ( \ 0xf4000000 + \
@@ -97,6 +102,7 @@#include <mach/mxc.h> +#include <mach/mx6q.h> #include <mach/mx50.h> #include <mach/mx51.h> #include <mach/mx53.h>
arch/arm/plat-mxc/include/mach/irqs.h +8 -2
@@ -14,9 +14,15 @@#include <asm-generic/gpio.h> /* -* SoCs with TZIC interrupt controller have 128 IRQs, those with AVIC have 64 +* SoCs with GIC interrupt controller have 160 IRQs, those with TZIC +* have 128 IRQs, and those with AVIC have 64. +* +* To support single image, the biggest number should be defined on +* top of the list. */ -#ifdef CONFIG_MXC_TZIC +#if definedCONFIG_ARM_GIC +#define MXC_INTERNAL_IRQS 160 +#elif definedCONFIG_MXC_TZIC #define MXC_INTERNAL_IRQS 128#else #define MXC_INTERNAL_IRQS 64
arch/arm/plat-mxc/include/mach/memory.h +3 -0
@@ -19,6 +19,7 @@#define MX50_PHYS_OFFSET UL(0x70000000)#define MX51_PHYS_OFFSET UL(0x90000000)#define MX53_PHYS_OFFSET UL(0x70000000) +#define MX6Q_PHYS_OFFSET UL(0x10000000)#if !defined(CONFIG_RUNTIME_PHYS_OFFSET )# if definedCONFIG_ARCH_MX1
@@ -37,6 +38,8 @@# define PLAT_PHYS_OFFSET MX51_PHYS_OFFSET# elif definedCONFIG_ARCH_MX53 # define PLAT_PHYS_OFFSET MX53_PHYS_OFFSET +# elif definedCONFIG_SOC_IMX6Q +# define PLAT_PHYS_OFFSET MX6Q_PHYS_OFFSET# endif #endif
arch/arm/plat-mxc/include/mach/mx6q.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. +* Copyright 2011 Linaro Ltd. +* +* The code contained herein is licensed under the GNU General Public +* License. You may obtain a copy of the GNU General Public License +* Version 2 or later at the following locations: +* +* http://www.opensource.org/licenses/gpl-license.html +* http://www.gnu.org/copyleft/gpl.html +*/ + +#ifndef __MACH_MX6Q_H__ +#define __MACH_MX6Q_H__ + +#define MX6Q_IO_P2V (x) IMX_IO_P2V(x) +#define MX6Q_IO_ADDRESS (x) IOMEM(MX6Q_IO_P2V(x)) + +/* +* The following are the blocks that need to be statically mapped. +* For other blocks, the base address really should be retrieved from +* device tree. +*/ +#define MX6Q_SCU_BASE_ADDR 0x00a00000 +#define MX6Q_SCU_SIZE 0x1000 +#define MX6Q_CCM_BASE_ADDR 0x020c4000 +#define MX6Q_CCM_SIZE 0x4000 +#define MX6Q_ANATOP_BASE_ADDR 0x020c8000 +#define MX6Q_ANATOP_SIZE 0x1000 +#define MX6Q_UART4_BASE_ADDR 0x021f0000 +#define MX6Q_UART4_SIZE 0x4000 + +#endif /* __MACH_MX6Q_H__ */
Signature · 1 line
1.7.4.1
PATCH v3 3/6 arm/imx6q: add core drivers clock, gpc, mmdc and src
In reply to Shawn GuoIt adds a number of core drivers support for imx6q, including clock, General Power Controller (gpc), Multi Mode DDR Controller(mmdc) and System Reset Controller (src).
--- arch/arm/mach-imx/Kconfig | 13 + arch/arm/mach-imx/Makefile | 4 + arch/arm/mach-imx/clock-imx6q.c | 2012 +++++++++++++++++++++++++++++++++++++++ arch/arm/mach-imx/gpc.c | 113 +++ arch/arm/mach-imx/mmdc.c | 71 ++ arch/arm/mach-imx/src.c | 49 + 6 files changed, 2262 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-imx/clock-imx6q.c create mode 100644 arch/arm/mach-imx/gpc.c create mode 100644 arch/arm/mach-imx/mmdc.c create mode 100644 arch/arm/mach-imx/src.c
arch/arm/mach-imx/Kconfig +13 -0
@@ -1,5 +1,15 @@ config IMX_HAVE_DMA_V1 bool + +config HAVE_IMX_GPC + bool + +config HAVE_IMX_MMDC + bool + +config HAVE_IMX_SRC + bool + # # ARCH_MX31 and ARCH_MX35 are left for compatibility # Some usages assume that having one of them implies not having (e.g.) ARCH_MX2.
@@ -613,6 +623,9 @@ config SOC_IMX6Q bool "i.MX6 Quad support" select ARM_GIC select CPU_V7 + select HAVE_IMX_GPC + select HAVE_IMX_MMDC + select HAVE_IMX_SRC select USE_OF help
arch/arm/mach-imx/Makefile +4 -0
@@ -63,3 +63,7 @@ obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o obj-$(CONFIG_DEBUG_LL) += lluart.o +obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o +obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o +obj-$(CONFIG_HAVE_IMX_SRC) += src.o +obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o
arch/arm/mach-imx/clock-imx6q.c new file +2012 -0
2,012 lines not on this page · raw message
arch/arm/mach-imx/gpc.c new file +113 -0
113 lines not on this page · raw message
arch/arm/mach-imx/mmdc.c new file +71 -0
71 lines not on this page · raw message
arch/arm/mach-imx/src.c new file +49 -0
49 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH v3 4/6 arm/imx6q: add smp and cpu hotplug support
In reply to Shawn GuoIt adds smp and cpu hotplug support for imx6q.
--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 4 ++ arch/arm/mach-imx/head-v7.S | 71 ++++++++++++++++++++++++++ arch/arm/mach-imx/hotplug.c | 44 ++++++++++++++++ arch/arm/mach-imx/localtimer.c | 35 +++++++++++++ arch/arm/mach-imx/platsmp.c | 85 +++++++++++++++++++++++++++++++ arch/arm/plat-mxc/include/mach/common.h | 5 ++ 7 files changed, 245 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-imx/head-v7.S create mode 100644 arch/arm/mach-imx/hotplug.c create mode 100644 arch/arm/mach-imx/localtimer.c create mode 100644 arch/arm/mach-imx/platsmp.c
arch/arm/mach-imx/Kconfig +1 -0
@@ -623,6 +623,7 @@ config SOC_IMX6Q bool "i.MX6 Quad support" select ARM_GIC select CPU_V7 + select HAVE_ARM_SCU select HAVE_IMX_GPC select HAVE_IMX_MMDC select HAVE_IMX_SRC
arch/arm/mach-imx/Makefile +4 -0
@@ -66,4 +66,8 @@ obj-$(CONFIG_DEBUG_LL) += lluart.o obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o obj-$(CONFIG_HAVE_IMX_SRC) += src.o +obj-$(CONFIG_CPU_V7) += head-v7.o +obj-$(CONFIG_SMP) += platsmp.o +obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o +obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o
arch/arm/mach-imx/head-v7.S new file +71 -0
71 lines not on this page · raw message
arch/arm/mach-imx/hotplug.c new file +44 -0
44 lines not on this page · raw message
arch/arm/mach-imx/localtimer.c new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright 2011 Freescale Semiconductor, Inc. +* Copyright 2011 Linaro Ltd. +* +* The code contained herein is licensed under the GNU General Public +* License. You may obtain a copy of the GNU General Public License +* Version 2 or later at the following locations: +* +* http://www.opensource.org/licenses/gpl-license.html +* http://www.gnu.org/copyleft/gpl.html +*/ + +#include <linux/init.h> +#include <linux/clockchips.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 ); +WARN_ON (!twd_base); + } + evt->irq =irq_of_parse_and_map (np,0 ); +twd_timer_setup (evt); + +return 0 ; +}
arch/arm/mach-imx/platsmp.c new file +85 -0
85 lines not on this page · raw message
arch/arm/plat-mxc/include/mach/common.h +5 -0
@@ -88,4 +88,9 @@ void gic_handle_irq(struct pt_regs *);#define mx53_handle_irq tzic_handle_irq#define imx6q_handle_irq gic_handle_irq +extern void imx_enable_cpu (int cpu,bool enable); +extern void imx_set_cpu_jump (int cpu,void *jump_addr); +#ifdef CONFIG_SMP +extern void v7_secondary_startup (void ); +#endif #endif
Signature · 1 line
1.7.4.1
Sascha Hauer
maintainerPATCH v3 4/6 arm/imx6q: add smp and cpu hotplug support
Quoted 34 lines · Shawn Guo
It adds smp and cpu hotplug support for imx6q.
Signed-off-by Shawn Guo <[email protected]>--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 4 ++ arch/arm/mach-imx/head-v7.S | 71 ++++++++++++++++++++++++++ arch/arm/mach-imx/hotplug.c | 44 ++++++++++++++++ arch/arm/mach-imx/localtimer.c | 35 +++++++++++++ arch/arm/mach-imx/platsmp.c | 85 +++++++++++++++++++++++++++++++ arch/arm/plat-mxc/include/mach/common.h | 5 ++ 7 files changed, 245 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-imx/head-v7.S create mode 100644 arch/arm/mach-imx/hotplug.c create mode 100644 arch/arm/mach-imx/localtimer.c create mode 100644 arch/arm/mach-imx/platsmp.carch/arm/mach-imx/Kconfig +1
-0@@ -623,6 +623,7 @@ config SOC_IMX6Q bool "i.MX6 Quad support" select ARM_GIC select CPU_V7 + select HAVE_ARM_SCU select HAVE_IMX_GPC select HAVE_IMX_MMDC select HAVE_IMX_SRCarch/arm/mach-imx/Makefile +0
-0
arch/arm/mach-imx/Makefile obj-$(CONFIG_DEBUG_LL) += lluart.o · line 69
Quoted 4 lines
arch/arm/mach-imx/Makefile +1
-0@@ -66,4 +66,8 @@ obj-$(CONFIG_DEBUG_LL) += lluart.o obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o obj-$(CONFIG_HAVE_IMX_SRC) += src.o +obj-$(CONFIG_CPU_V7) += head-v7.o
Can we have a
AFLAGS_head-v7.o :=-Wa,-march=armv7-a
here?
Then you only have to adjust some Kconfig variables and can compile i.MX3 and i.MX6 together. I just gave it a test and it works on i.MX3, I don't have a i.MX6 platform to test on though.
The following patch could be a starting point. I merged the imx-features branch into it so it probably won't apply cleanly on your series.
8<----------------------------------------
PATCH v3 4/6 arm/imx6q: add smp and cpu hotplug support
Review
Quoted 3 lines · Sascha Hauer
(quoted diff) +3
-0+config ARCH_IMX_V6_V7 + bool "i.MX3, i.MX6" + select AUTO_ZRELADDR
It's not a good idea to select this symbol, because it prevents ZBOOT_ROM being used (iow, you can't ROM-ify the decompressor if you select this symbol.)
ZBOOT_ROM is still offered, but you end up breaking the dependencies for AUTO_ZRELADDR if you select it.
PATCH v3 4/6 arm/imx6q: add smp and cpu hotplug support
In reply to Sascha HauerQuoted 44 lines · Sascha Hauer
Quoted 34 lines · Shawn Guo
It adds smp and cpu hotplug support for imx6q.
Signed-off-by Shawn Guo <[email protected]>--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 4 ++ arch/arm/mach-imx/head-v7.S | 71 ++++++++++++++++++++++++++ arch/arm/mach-imx/hotplug.c | 44 ++++++++++++++++ arch/arm/mach-imx/localtimer.c | 35 +++++++++++++ arch/arm/mach-imx/platsmp.c | 85 +++++++++++++++++++++++++++++++ arch/arm/plat-mxc/include/mach/common.h | 5 ++ 7 files changed, 245 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-imx/head-v7.S create mode 100644 arch/arm/mach-imx/hotplug.c create mode 100644 arch/arm/mach-imx/localtimer.c create mode 100644 arch/arm/mach-imx/platsmp.carch/arm/mach-imx/Kconfig +1
-0@@ -623,6 +623,7 @@ config SOC_IMX6Q bool "i.MX6 Quad support" select ARM_GIC select CPU_V7 + select HAVE_ARM_SCU select HAVE_IMX_GPC select HAVE_IMX_MMDC select HAVE_IMX_SRCarch/arm/mach-imx/Makefile +0
-0arch/arm/mach-imx/Makefile obj-$(CONFIG_DEBUG_LL) += lluart.o · line 69
Quoted 4 lines
arch/arm/mach-imx/Makefile +1
-0@@ -66,4 +66,8 @@ obj-$(CONFIG_DEBUG_LL) += lluart.o obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o obj-$(CONFIG_HAVE_IMX_SRC) += src.o +obj-$(CONFIG_CPU_V7) += head-v7.oCan we have a
AFLAGS_head-v7.o :=-Wa,-march=armv7-a
Quoted 9 lines
here?
Then you only have to adjust some
Kconfigvariables and can compile i.MX3 and i.MX6 together. I just gave it a test and it works on i.MX3, I don't have a i.MX6 platform to test on though.The following patch could be a starting point. I merged the imx-features branch into it so it probably won't apply cleanly on your series.
I will try to test and fold it in my series tomorrow.
Signature · 2 lines
Regards, Shawn
PATCH v3 4/6 arm/imx6q: add smp and cpu hotplug support
In reply to Sascha HauerQuoted 42 lines · Sascha Hauer
Quoted 34 lines · Shawn Guo
It adds smp and cpu hotplug support for imx6q.
Signed-off-by Shawn Guo <[email protected]>--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 4 ++ arch/arm/mach-imx/head-v7.S | 71 ++++++++++++++++++++++++++ arch/arm/mach-imx/hotplug.c | 44 ++++++++++++++++ arch/arm/mach-imx/localtimer.c | 35 +++++++++++++ arch/arm/mach-imx/platsmp.c | 85 +++++++++++++++++++++++++++++++ arch/arm/plat-mxc/include/mach/common.h | 5 ++ 7 files changed, 245 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-imx/head-v7.S create mode 100644 arch/arm/mach-imx/hotplug.c create mode 100644 arch/arm/mach-imx/localtimer.c create mode 100644 arch/arm/mach-imx/platsmp.carch/arm/mach-imx/Kconfig +1
-0@@ -623,6 +623,7 @@ config SOC_IMX6Q bool "i.MX6 Quad support" select ARM_GIC select CPU_V7 + select HAVE_ARM_SCU select HAVE_IMX_GPC select HAVE_IMX_MMDC select HAVE_IMX_SRCarch/arm/mach-imx/Makefile +0
-0arch/arm/mach-imx/Makefile obj-$(CONFIG_DEBUG_LL) += lluart.o · line 69
Quoted 4 lines
arch/arm/mach-imx/Makefile +1
-0@@ -66,4 +66,8 @@ obj-$(CONFIG_DEBUG_LL) += lluart.o obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o obj-$(CONFIG_HAVE_IMX_SRC) += src.o +obj-$(CONFIG_CPU_V7) += head-v7.oCan we have a
Quoted 8 lines
AFLAGS_head-v7.o :=-Wa,-march=armv7-a
here?
Then you only have to adjust some
Kconfigvariables and can compile i.MX3 and i.MX6 together. I just gave it a test and it works on i.MX3, I don't have a i.MX6 platform to test on though.
I tested it on imx6q, and it does not work. I tracked it to the point at mxc_init_l2x0() which is an early_initcall. Because we do not have mxc_cpu_type and cpu_is_mx6q() defined, the execution goes through the (!cpu_is_mx31() && !cpu_is_mx35()) check and ends up with Oops on imx6q.
I do not want to add mxc_cpu_type and cpu_is_mx6q() stuff, so I intend to remove early_initcall there, and let imx31/35_soc_init() explicitly calls mxc_init_l2x0().
Let me know if you get a different position.
Signature · 2 lines
Regards, Shawn
PATCH v3 4/6 arm/imx6q: add smp and cpu hotplug support
Quoted 57 lines · Shawn Guo
Quoted 42 lines · Sascha Hauer
Quoted 34 lines · Shawn Guo
It adds smp and cpu hotplug support for imx6q.
Signed-off-by Shawn Guo <[email protected]>--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 4 ++ arch/arm/mach-imx/head-v7.S | 71 ++++++++++++++++++++++++++ arch/arm/mach-imx/hotplug.c | 44 ++++++++++++++++ arch/arm/mach-imx/localtimer.c | 35 +++++++++++++ arch/arm/mach-imx/platsmp.c | 85 +++++++++++++++++++++++++++++++ arch/arm/plat-mxc/include/mach/common.h | 5 ++ 7 files changed, 245 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-imx/head-v7.S create mode 100644 arch/arm/mach-imx/hotplug.c create mode 100644 arch/arm/mach-imx/localtimer.c create mode 100644 arch/arm/mach-imx/platsmp.carch/arm/mach-imx/Kconfig +1
-0@@ -623,6 +623,7 @@ config SOC_IMX6Q bool "i.MX6 Quad support" select ARM_GIC select CPU_V7 + select HAVE_ARM_SCU select HAVE_IMX_GPC select HAVE_IMX_MMDC select HAVE_IMX_SRCarch/arm/mach-imx/Makefile +0
-0arch/arm/mach-imx/Makefile obj-$(CONFIG_DEBUG_LL) += lluart.o · line 69
Quoted 4 lines
arch/arm/mach-imx/Makefile +1
-0@@ -66,4 +66,8 @@ obj-$(CONFIG_DEBUG_LL) += lluart.o obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o obj-$(CONFIG_HAVE_IMX_SRC) += src.o +obj-$(CONFIG_CPU_V7) += head-v7.oCan we have a
Quoted 8 lines
AFLAGS_head-v7.o :=-Wa,-march=armv7-a
here?
Then you only have to adjust some
Kconfigvariables and can compile i.MX3 and i.MX6 together. I just gave it a test and it works on i.MX3, I don't have a i.MX6 platform to test on though.I tested it on imx6q, and it does not work. I tracked it to the point at
mxc_init_l2x0()which is anearly_initcall. Because we do not havemxc_cpu_typeandcpu_is_mx6q()defined, the execution goes through the (!cpu_is_mx31() && !cpu_is_mx35()) check and ends up with Oops on imx6q.
Quoted 4 lines
I do not want to add
mxc_cpu_typeandcpu_is_mx6q()stuff, so I intend to removeearly_initcallthere, and let imx31/35_soc_init() explicitly callsmxc_init_l2x0().
I'm changing my mind (so quickly). It turns out we will fall into a number of other traps if we build imx6q with imx3 without mxc_cpu_type set up for imx6q, arch_idle(), __imx_ioremap(), etc. So for now, I want to add mxc_cpu_type for imx6q to cooperate with all these traps.
Signature · 2 lines
Regards, Shawn
Sascha Hauer
maintainerPATCH v3 4/6 arm/imx6q: add smp and cpu hotplug support
Quoted 9 lines · Shawn Guo
Quoted 5 lines
I do not want to add
mxc_cpu_typeandcpu_is_mx6q()stuff, so I intend to removeearly_initcallthere, and let imx31/35_soc_init() explicitly callsmxc_init_l2x0().I'm changing my mind (so quickly). It turns out we will fall into a number of other traps if we build imx6q with imx3 without
mxc_cpu_typeset up for imx6q,arch_idle(),__imx_ioremap(), etc. So for now, I want to addmxc_cpu_typefor imx6q to cooperate with all these traps.
I'm fine with reducing the usage of cpu_is_* macros up to the point when we don't need them anymore. But as you already found out, it's better to do this seperately.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH v3 4/6 arm/imx6q: add smp and cpu hotplug support
Quoted 6 lines · Sascha Hauer
Quoted 5 lines · Shawn Guo
Quoted 5 lines
I do not want to add
mxc_cpu_typeandcpu_is_mx6q()stuff, so I intend to removeearly_initcallthere, and let imx31/35_soc_init() explicitly callsmxc_init_l2x0().
Quoted 9 lines
Quoted 4 lines
I'm changing my mind (so quickly). It turns out we will fall into a number of other traps if we build imx6q with imx3 without
mxc_cpu_typeset up for imx6q,arch_idle(),__imx_ioremap(), etc. So for now, I want to addmxc_cpu_typefor imx6q to cooperate with all these traps.I'm fine with reducing the usage of cpu_is_* macros up to the point when we don't need them anymore. But as you already found out, it's better to do this seperately.
I'm changing my mind again. I decided to clean up these traps with a patch series, which I'm sending right now.
Signature · 2 lines
Regards, Shawn
PATCH v3 4/6 arm/imx6q: add smp and cpu hotplug support
In reply to Sascha HauerQuoted 158 lines · Sascha Hauer
Quoted 34 lines · Shawn Guo
It adds smp and cpu hotplug support for imx6q.
Signed-off-by Shawn Guo <[email protected]>--- arch/arm/mach-imx/Kconfig | 1 + arch/arm/mach-imx/Makefile | 4 ++ arch/arm/mach-imx/head-v7.S | 71 ++++++++++++++++++++++++++ arch/arm/mach-imx/hotplug.c | 44 ++++++++++++++++ arch/arm/mach-imx/localtimer.c | 35 +++++++++++++ arch/arm/mach-imx/platsmp.c | 85 +++++++++++++++++++++++++++++++ arch/arm/plat-mxc/include/mach/common.h | 5 ++ 7 files changed, 245 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-imx/head-v7.S create mode 100644 arch/arm/mach-imx/hotplug.c create mode 100644 arch/arm/mach-imx/localtimer.c create mode 100644 arch/arm/mach-imx/platsmp.carch/arm/mach-imx/Kconfig +1
-0@@ -623,6 +623,7 @@ config SOC_IMX6Q bool "i.MX6 Quad support" select ARM_GIC select CPU_V7 + select HAVE_ARM_SCU select HAVE_IMX_GPC select HAVE_IMX_MMDC select HAVE_IMX_SRCarch/arm/mach-imx/Makefile +0
-0arch/arm/mach-imx/Makefile obj-$(CONFIG_DEBUG_LL) += lluart.o · line 69
Quoted 4 lines
arch/arm/mach-imx/Makefile +1
-0@@ -66,4 +66,8 @@ obj-$(CONFIG_DEBUG_LL) += lluart.o obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o obj-$(CONFIG_HAVE_IMX_SRC) += src.o +obj-$(CONFIG_CPU_V7) += head-v7.oCan we have a
AFLAGS_head-v7.o :=-Wa,-march=armv7-a
here?
Then you only have to adjust some
Kconfigvariables and can compile i.MX3 and i.MX6 together. I just gave it a test and it works on i.MX3, I don't have a i.MX6 platform to test on though.The following patch could be a starting point. I merged the imx-features branch into it so it probably won't apply cleanly on your series.
8<----------------------------------------
From
010a61373355e6cba6856272e3fd8e22e8ee3ccdMon Sep 17 00:00:00 2001
From: Sascha Hauer <[email protected]>
Date: Mon, 26 Sep 2011 13:04:08 +0200
Subject: [PATCH] merge i.MX3 and i.MX6Signed-off-by Sascha Hauer <[email protected]>--- arch/arm/Makefile | 3 +-- arch/arm/mach-imx/Kconfig | 7 +++---- arch/arm/mach-imx/Makefile | 1 + arch/arm/mm/Kconfig | 4 ++-- arch/arm/plat-mxc/Kconfig | 14 ++++++-------- 5 files changed, 13 insertions(+), 16 deletions(-)arch/arm/Makefile +1
-2@@ -155,9 +155,8 @@ machine-$(CONFIG_ARCH_MMP) := mmp machine-$(CONFIG_ARCH_MSM) := msm machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 machine-$(CONFIG_ARCH_IMX_V4_V5) := imx -machine-$(CONFIG_ARCH_MX3) := imx +machine-$(CONFIG_ARCH_IMX_V6_V7) := imx machine-$(CONFIG_ARCH_MX5) := mx5 -machine-$(CONFIG_ARCH_MX6) := imx machine-$(CONFIG_ARCH_MXS) := mxs machine-$(CONFIG_ARCH_NETX) := netx machine-$(CONFIG_ARCH_NOMADIK) := nomadikarch/arm/mach-imx/Kconfig +3
-4@@ -74,6 +74,7 @@ config SOC_IMX31 select ARCH_MXC_AUDMUX_V2 select ARCH_MX31 select MXC_AVIC + select SMP_ON_UP if SMP config SOC_IMX35 bool@@ -83,6 +84,7 @@ config SOC_IMX35 select HAVE_EPIT select ARCH_MX35 select MXC_AVIC + select SMP_ON_UP if SMP if ARCH_IMX_V4_V5@@ -351,7 +353,7 @@ config MACH_IMX27IPCAM endif -if ARCH_MX3 +if ARCH_IMX_V6_V7 comment "MX31 platforms:"@@ -601,9 +603,6 @@ config MACH_VPR200 Include support for VPR200 platform. This includes specific configurations for the board and its peripherals. -endif - -if ARCH_MX6 comment "i.MX6 family:" config SOC_IMX6Qarch/arm/mach-imx/Makefile +1
-0@@ -66,6 +66,7 @@ obj-$(CONFIG_DEBUG_LL) += lluart.o obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o obj-$(CONFIG_HAVE_IMX_SRC) += src.o +AFLAGS_head-v7.o :=-Wa,-march=armv7-a obj-$(CONFIG_CPU_V7) += head-v7.o obj-$(CONFIG_SMP) += platsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.oarch/arm/mm/Kconfig +2
-2@@ -819,10 +819,10 @@ config CACHE_FEROCEON_L2_WRITETHROUGH config CACHE_L2X0 bool "Enable the L2x0 outer cache controller" depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \ - REALVIEW_EB_A9MP || SOC_IMX35 || SOC_IMX31 || MACH_REALVIEW_PBX || \ + REALVIEW_EB_A9MP || ARCH_IMX_V6_V7 || 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_MX6 + ARCH_PRIMA2 || ARCH_ZYNQ || ARCH_CNS3XXX default y select OUTER_CACHE select OUTER_CACHE_SYNCarch/arm/plat-mxc/Kconfig +0
-0
arch/arm/plat-mxc/Kconfig config ARCH_IMX_V4_V5 · line 20
Quoted 5 lines
arch/arm/plat-mxc/Kconfig +0
-2@@ -16,10 +16,13 @@ config ARCH_IMX_V4_V5 This enables support for systems based on the Freescale i.MX ARMv4 and ARMv5 SoCs -config ARCH_MX3 - bool "MX3-based"
Then the following ARCH_MX3 references need to be removed properly. I will take care of them.
arch/arm/mach-imx/Makefile.boot:17:zreladdr-$(CONFIG_ARCH_MX3) += 0x80008000 arch/arm/mach-imx/Makefile.boot:18:params_phys-$(CONFIG_ARCH_MX3) := 0x80000100 arch/arm/mach-imx/Makefile.boot:19:initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000 arch/arm/plat-mxc/Kconfig:9: default ARCH_MX3 arch/arm/plat-mxc/include/mach/memory.h:25:# if defined CONFIG_ARCH_MX3
Regards,
Shawn
Quoted 24 lines
arch/arm/plat-mxc/Kconfig +6
-6+config ARCH_IMX_V6_V7 + bool "i.MX3, i.MX6" + select AUTO_ZRELADDR + select ARM_PATCH_PHYS_VIRT help - This enables support for systems based on the Freescale i.MX3 family + This enables support for systems based on the Freescale i.MX3 and i.MX6 + family. config ARCH_MX5 bool "i.MX50, i.MX51, i.MX53"@@ -29,11 +32,6 @@ config ARCH_MX5 This enables support for machines using Freescale's i.MX50 and i.MX51 processors. -config ARCH_MX6 - bool "i.MX6" - help - This enables support for systems based on the Freescale i.MX6 family - endchoice source "arch/arm/mach-imx/Kconfig"
PATCH v3 5/6 arm/imx6q: add device tree machine support
In reply to Shawn GuoIt adds generic device tree based machine support for imx6q.
--- arch/arm/mach-imx/Makefile | 2 +- arch/arm/mach-imx/mach-imx6q.c | 84 +++++++++++++++++++++++++++++++ arch/arm/mm/Kconfig | 2 +- arch/arm/plat-mxc/include/mach/common.h | 13 +++++ 4 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-imx/Makefile +1 -1
@@ -70,4 +70,4 @@ obj-$(CONFIG_CPU_V7) += head-v7.o obj-$(CONFIG_SMP) += platsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o -obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o +obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o
arch/arm/mach-imx/mach-imx6q.c new file +84 -0
84 lines not on this page · raw message
arch/arm/mm/Kconfig +1 -1
@@ -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_MX6 default y select OUTER_CACHE select OUTER_CACHE_SYNC
arch/arm/plat-mxc/include/mach/common.h +13 -0
@@ -64,6 +64,7 @@ extern int mx51_clocks_init(unsigned long ckil, unsigned long osc, unsigned long ckih1, unsigned long ckih2);extern int mx53_clocks_init (unsigned long ckil,unsigned long osc,unsigned long ckih1,unsigned long ckih2); +extern int mx6q_clocks_init (void );extern struct platform_device *mxc_register_gpio (char *name,int id,resource_size_t iobase,resource_size_t iosize,int irq,int irq_high);extern int mxc_register_device (struct platform_device *pdev,void *data);
@@ -90,7 +91,19 @@ void gic_handle_irq(struct pt_regs *);extern void imx_enable_cpu (int cpu,bool enable);extern void imx_set_cpu_jump (int cpu,void *jump_addr); +#ifdef CONFIG_DEBUG_LL +extern void imx_lluart_map_io (void ); +#else +static inline void imx_lluart_map_io (void ) {} +#endif #ifdef CONFIG_SMP extern void v7_secondary_startup (void ); +extern void imx_scu_map_io (void ); +#else +static inline void imx_scu_map_io (void ) {}#endif +extern void imx_enable_cpu (int cpu,bool enable); +extern void imx_set_cpu_jump (int cpu,void *jump_addr); +extern void imx_src_init (void ); +extern void imx_gpc_init (void );#endif
Signature · 1 line
1.7.4.1
PATCH v3 6/6 arm/imx6q: add suspend/resume support
In reply to Shawn GuoIt adds suspend/resume support for imx6q.
--- arch/arm/mach-imx/Makefile | 2 +- arch/arm/mach-imx/head-v7.S | 32 +++++++++++ arch/arm/mach-imx/pm-imx6q.c | 90 +++++++++++++++++++++++++++++++ arch/arm/plat-mxc/include/mach/common.h | 9 +++ 4 files changed, 132 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-imx/pm-imx6q.c
arch/arm/mach-imx/Makefile +1 -1
@@ -70,4 +70,4 @@ obj-$(CONFIG_CPU_V7) += head-v7.o obj-$(CONFIG_SMP) += platsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o -obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o +obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o pm-imx6q.o
arch/arm/mach-imx/head-v7.S +32 -0
@@ -69,3 +69,35 @@ ENTRY(v7_secondary_startup) b secondary_startup ENDPROC(v7_secondary_startup) #endif + +ENTRY(pl310_get_save_ptr) + ldr r0, =pl310_pbase + mov pc, lr +ENDPROC(pl310_get_save_ptr) + +/* + * The following code is located into the .data section. This is to + * allow pl310_pbase and pl310_aux_ctrl to be accessed with a relative + * load as we are running on physical address here. + */ + .data + .align + + .macro pl310_resume + adr r2, pl310_pbase + ldmia r2, {r0, r1} + str r1, [r0, #L2X0_AUX_CTRL] @ restore aux_ctrl + mov r1, #0x1 + str r1, [r0, #L2X0_CTRL] @ re-enable L2 + .endm + +ENTRY(v7_cpu_resume) + bl v7_invalidate_l1 + pl310_resume + b cpu_resume +ENDPROC(v7_cpu_resume) + +pl310_pbase: + .long 0 +pl310_aux_ctrl: + .long 0
arch/arm/mach-imx/pm-imx6q.c new file +90 -0
90 lines not on this page · raw message
arch/arm/plat-mxc/include/mach/common.h +9 -0
@@ -13,6 +13,7 @@struct platform_device ;struct clk ; +enum mxc_cpu_pwr_mode ;extern void mx1_map_io (void );extern void mx21_map_io (void );
@@ -96,14 +97,22 @@ extern void imx_lluart_map_io(void);#else static inline void imx_lluart_map_io (void ) {}#endif +extern void v7_cpu_resume (void ); +extern u32 *pl310_get_save_ptr (void );#ifdef CONFIG_SMP extern void v7_secondary_startup (void );extern void imx_scu_map_io (void ); +extern void imx_smp_prepare (void );#else static inline void imx_scu_map_io (void ) {} +static inline void imx_smp_prepare (void ) {}#endif extern void imx_enable_cpu (int cpu,bool enable);extern void imx_set_cpu_jump (int cpu,void *jump_addr);extern void imx_src_init (void );extern void imx_gpc_init (void ); +extern void imx_gpc_pre_suspend (void ); +extern void imx_gpc_post_resume (void ); +extern int imx6q_set_lpm (enum mxc_cpu_pwr_mode mode); +extern void imx6q_pm_init (void );#endif
Signature · 1 line
1.7.4.1