Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: vf610: enable Cortex-M4 configuration on Vybrid SoC

This patch allows to build the Kernel for Vybrid (VF6xx) SoC
when ARMv7-M CPU is selected. The resulting image runs on the
secondary Cortex-M4 core. This core has equally access to all
peripherals as the main Cortex-A5 core. However, there is no
resource control mechanism, hence when both cores are used
simultaneously, orthogonal device tree's are required.

The boot CPU is dependent on the SoC variant. The available
boards use mostly variants where the Cortex-A5 is the primary
and hence the boot CPU. Booting the secondary Cortex-M4 CPU
needs SoC specific registers written. There is no in kernel
support for this right now, a external userspace utility
called "m4boot" can be used to boot the kernel:

m4boot xipImage initramfs.cpio.lzo vf610m4-colibri.dtb

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Stefan Agner and committed by
Arnd Bergmann
8064887e 9c77bc43

+25 -17
+3
Documentation/devicetree/bindings/arm/fsl.txt
··· 81 81 For the Vybrid SoC familiy all variants with DDR controller are supported, 82 82 which is the VF5xx and VF6xx series. Out of historical reasons, in most 83 83 places the kernel uses vf610 to refer to the whole familiy. 84 + The compatible string "fsl,vf610m4" is used for the secondary Cortex-M4 85 + core support. 84 86 85 87 Required root node compatible property (one of them): 86 88 - compatible = "fsl,vf500"; 87 89 - compatible = "fsl,vf510"; 88 90 - compatible = "fsl,vf600"; 89 91 - compatible = "fsl,vf610"; 92 + - compatible = "fsl,vf610m4"; 90 93 91 94 Freescale LS1021A Platform Device Tree Bindings 92 95 ------------------------------------------------
+21 -17
arch/arm/mach-imx/Kconfig
··· 1 1 menuconfig ARCH_MXC 2 - bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 2 + bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M 3 3 select ARCH_REQUIRE_GPIOLIB 4 4 select ARM_CPU_SUSPEND if PM 5 5 select CLKSRC_MMIO ··· 496 496 497 497 endif 498 498 499 - if ARCH_MULTI_V5 500 - 501 499 comment "Device tree only" 500 + 501 + if ARCH_MULTI_V5 502 502 503 503 config SOC_IMX25 504 504 bool "i.MX25 support" ··· 512 512 513 513 if ARCH_MULTI_V7 514 514 515 - comment "Device tree only" 515 + comment "Cortex-A platforms" 516 516 517 517 config SOC_IMX5 518 518 bool ··· 582 582 help 583 583 This enables support for Freescale i.MX6 SoloX processor. 584 584 585 + config SOC_LS1021A 586 + bool "Freescale LS1021A support" 587 + select ARM_GIC 588 + select HAVE_ARM_ARCH_TIMER 589 + select PCI_DOMAINS if PCI 590 + select ZONE_DMA if ARM_LPAE 591 + help 592 + This enables support for Freescale LS1021A processor. 593 + 594 + endif 595 + 596 + comment "Cortex-A/Cortex-M asymmetric multiprocessing platforms" 597 + 598 + if ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M 599 + 585 600 config SOC_VF610 586 601 bool "Vybrid Family VF610 support" 587 - select IRQ_DOMAIN_HIERARCHY 588 - select ARM_GIC 602 + select ARM_GIC if ARCH_MULTI_V7 589 603 select PINCTRL_VF610 590 604 select PL310_ERRATA_769419 if CACHE_L2X0 591 605 select SMP_ON_UP if SMP ··· 613 599 default VF_USE_ARM_GLOBAL_TIMER 614 600 615 601 config VF_USE_ARM_GLOBAL_TIMER 616 - bool "Use ARM Global Timer" 602 + bool "Use ARM Global Timer" if ARCH_MULTI_V7 617 603 select ARM_GLOBAL_TIMER 618 604 select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK 619 605 help ··· 626 612 Use SoC Periodic Interrupt Timer (PIT) as clocksource 627 613 628 614 endchoice 629 - 630 - config SOC_LS1021A 631 - bool "Freescale LS1021A support" 632 - select ARM_GIC 633 - select HAVE_ARM_ARCH_TIMER 634 - select PCI_DOMAINS if PCI 635 - select ZONE_DMA if ARM_LPAE 636 - 637 - help 638 - This enables support for Freescale LS1021A processor. 639 615 640 616 endif 641 617
arch/arm/mach-imx/Makefile.boot
+1
arch/arm/mach-imx/mach-vf610.c
··· 17 17 "fsl,vf510", 18 18 "fsl,vf600", 19 19 "fsl,vf610", 20 + "fsl,vf610m4", 20 21 NULL, 21 22 }; 22 23