Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311002
b: refs/heads/master
c: 8e56130
h: refs/heads/master
v: v3
  • Loading branch information
Rob Herring authored and Olof Johansson committed Jun 8, 2012
1 parent 25f3db5 commit ebb9362
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f4b3bf5dc0edb5b08d96486f35f5cbc24b72c40
refs/heads/master: 8e56130dcbcc0608c2531c61f93175e36a300e58
6 changes: 5 additions & 1 deletion trunk/arch/arm/mach-highbank/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-highbank/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
14 changes: 14 additions & 0 deletions trunk/arch/arm/mach-highbank/highbank.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,24 @@ 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)
Expand Down
27 changes: 27 additions & 0 deletions trunk/arch/arm/mach-highbank/smc.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copied from omap44xx-smc.S Copyright (C) 2010 Texas Instruments, Inc.
* Copyright 2012 Calxeda, Inc.
*
* 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.
* Function signature : void highbank_smc1(u32 fn, u32 arg)
*/

ENTRY(highbank_smc1)
stmfd sp!, {r4-r11, lr}
mov r12, r0
mov r0, r1
dsb
smc #0
ldmfd sp!, {r4-r11, pc}
ENDPROC(highbank_smc1)

0 comments on commit ebb9362

Please sign in to comment.