David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copied from omap44xx-smc.S Copyright (C) 2010 Texas Instruments, Inc. |
| 4 | * Copyright 2012 Calxeda, Inc. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <linux/linkage.h> |
| 8 | |
| 9 | /* |
| 10 | * This is common routine to manage secure monitor API |
| 11 | * used to modify the PL310 secure registers. |
| 12 | * 'r0' contains the value to be modified and 'r12' contains |
| 13 | * the monitor API number. |
| 14 | * Function signature : void highbank_smc1(u32 fn, u32 arg) |
| 15 | */ |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 16 | .arch armv7-a |
| 17 | .arch_extension sec |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 18 | ENTRY(highbank_smc1) |
| 19 | stmfd sp!, {r4-r11, lr} |
| 20 | mov r12, r0 |
| 21 | mov r0, r1 |
| 22 | dsb |
| 23 | smc #0 |
| 24 | ldmfd sp!, {r4-r11, pc} |
| 25 | ENDPROC(highbank_smc1) |