On 06/05/2012 11:46 AM, Brendan Conoboy wrote: > On 06/01/2012 11:26 AM, Mark Langsdorf wrote: >> I'll submit a 3.4 and a 3.5 patch later today or Monday, then. > > Hi Mark, > > To be explicit, what we'd like to see is the 3.4 patch concurrent with > an upstream submission. Once you've submitted the patch to upstream > we'll carry it in the Fedora kernel until such time as it's accepted > upstream and filters down again. Thanks!
A slightly backported patch follows. I dropped some of the patches as I can't find the upstream submissions for them yet. The L2 enable/disable patch included below was submitted to the linux-arm-kernel mailing list on Monday: http://lists.arm.linux.org.uk/lurker/message/20120605.031140.e7d9b601.en.html --Mark Langsdorf Calxeda, Inc. From acffb24c938056f6fe76a883c92c80c32e560e9b Mon Sep 17 00:00:00 2001 From: Mark Langsdorf <mark.langsd...@calxeda.com> Date: Tue, 5 Jun 2012 10:59:30 -0400 Subject: [PATCH] arm, highbank: l2 fix Linux runs in non-secure mode on highbank, so we need secure monitor calls to enable and disable the PL310. Rather than invent new smc calls, the same calling convention used by OMAP is used here. Signed-off-by: Rob Herring <rob.herr...@calxeda.com> Signed-off-by: Mark Langsdorf <mark.langsd...@calxeda.com> --- highbank-various.patch | 207 ++++++++++++++++++++++++++++++++++++++++++++++++ kernel.spec | 5 ++ 2 files changed, 212 insertions(+) create mode 100644 highbank-various.patch diff --git a/highbank-various.patch b/highbank-various.patch new file mode 100644 index 0000000..36b703a --- /dev/null +++ b/highbank-various.patch @@ -0,0 +1,207 @@ +diff --git a/arch/arm/mach-highbank/Makefile b/arch/arm/mach-highbank/Makefile +index f8437dd..ded4652 100644 +--- a/arch/arm/mach-highbank/Makefile ++++ b/arch/arm/mach-highbank/Makefile +@@ -1,4 +1,8 @@ +-obj-y := clock.o highbank.o system.o ++obj-y := clock.o highbank.o system.o smc.o ++ ++plus_sec := $(call as-instr,.arch_extension sec,+sec) ++AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) ++ + obj-$(CONFIG_DEBUG_HIGHBANK_UART) += lluart.o + obj-$(CONFIG_SMP) += platsmp.o + obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o +diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h +index d8e2d0b..141ed51 100644 +--- a/arch/arm/mach-highbank/core.h ++++ b/arch/arm/mach-highbank/core.h +@@ -8,3 +8,4 @@ extern void highbank_lluart_map_io(void); + static inline void highbank_lluart_map_io(void) {} + #endif + ++extern void highbank_smc1(int fn, int arg); +diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c +index 410a112..0ab6b34 100644 +--- a/arch/arm/mach-highbank/highbank.c ++++ b/arch/arm/mach-highbank/highbank.c +@@ -85,10 +85,25 @@ const static struct of_device_id irq_match[] = { + {} + }; + ++#ifdef CONFIG_CACHE_L2X0 ++static void highbank_l2x0_disable(void) ++{ ++ /* Disable PL310 L2 Cache controller */ ++ highbank_smc1(0x102, 0x0); ++} ++#endif ++ ++ + static void __init highbank_init_irq(void) + { + of_irq_init(irq_match); ++ ++#ifdef CONFIG_CACHE_L2X0 ++ /* Enable PL310 L2 Cache controller */ ++ highbank_smc1(0x102, 0x1); + l2x0_of_init(0, ~0UL); ++ outer_cache.disable = highbank_l2x0_disable; ++#endif + } + + static void __init highbank_timer_init(void) +diff --git a/arch/arm/mach-highbank/smc.S b/arch/arm/mach-highbank/smc.S +new file mode 100644 +index 0000000..8b11632 +--- /dev/null ++++ b/arch/arm/mach-highbank/smc.S +@@ -0,0 +1,31 @@ ++/* ++ * Copied from omap44xx-smc.S ++ * Copyright (C) 2010 Texas Instruments, Inc. ++ * Written by Santosh Shilimkar <santosh.shilim...@ti.com> ++ * ++ * ++ * 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/linkage.h> ++ ++/* ++ * This is common routine to manage secure monitor API ++ * used to modify the PL310 secure registers. ++ * 'r0' contains the value to be modified and 'r12' contains ++ * the monitor API number. It uses few CPU registers ++ * internally and hence they need be backed up including ++ * link register "lr". ++ * Function signature : void omap_smc1(u32 fn, u32 arg) ++ */ ++ ++ENTRY(highbank_smc1) ++ stmfd sp!, {r2-r12, lr} ++ mov r12, r0 ++ mov r0, r1 ++ dsb ++ smc #0 ++ ldmfd sp!, {r2-r12, pc} ++ENDPROC(highbank_smc1) diff --git a/kernel.spec b/kernel.spec index 4d5375e..355820d 100644 --- a/kernel.spec +++ b/kernel.spec @@ -722,6 +722,7 @@ Patch21006: arm-beagle-usb-init.patch # ARM highbank patches # Highbank clock functions need to be EXPORT for module builds Patch21010: highbank-export-clock-functions.patch +Patch21011: highbank-various.patch Patch21094: power-x86-destdir.patch @@ -1446,6 +1447,7 @@ ApplyPatch weird-root-dentry-name-debug.patch #Highbank clock functions ApplyPatch highbank-export-clock-functions.patch +ApplyPatch highbank-various.patch #selinux ptrace child permissions ApplyPatch selinux-apply-different-permission-to-ptrace-child.patch @@ -2330,6 +2332,9 @@ fi # '-' | | # '-' %changelog +* Tue Jun 05 2012 Mark Langsdorf <mark.langsd...@calxeda.com> +- Add various necessary fixes for highbank + * Tue Jun 5 2012 Peter Robinson <pbrobin...@fedoraproject.org> - Update ARM config options for 3.4 - Enable MTD/UBI/JFFS2 on ARM platforms -- 1.7.10.1 _______________________________________________ arm mailing list arm@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/arm