Stefan Roese | e463bf3 | 2015-01-19 11:33:42 +0100 | [diff] [blame] | 1 | /* |
| 2 | * SPDX-License-Identifier: GPL-2.0+ |
| 3 | */ |
| 4 | |
| 5 | #include <config.h> |
Stefan Roese | e463bf3 | 2015-01-19 11:33:42 +0100 | [diff] [blame] | 6 | #include <linux/linkage.h> |
| 7 | |
| 8 | ENTRY(save_boot_params) |
Stefan Roese | 00b154f | 2015-03-11 12:05:04 +0100 | [diff] [blame] | 9 | b save_boot_params_ret |
Stefan Roese | e463bf3 | 2015-01-19 11:33:42 +0100 | [diff] [blame] | 10 | ENDPROC(save_boot_params) |
| 11 | |
| 12 | /* |
| 13 | * cache_inv - invalidate Cache line |
| 14 | * r0 - dest |
| 15 | */ |
| 16 | .global cache_inv |
| 17 | .type cache_inv, %function |
| 18 | cache_inv: |
| 19 | |
| 20 | stmfd sp!, {r1-r12} |
| 21 | |
| 22 | mcr p15, 0, r0, c7, c6, 1 |
| 23 | |
| 24 | ldmfd sp!, {r1-r12} |
| 25 | bx lr |
| 26 | |
| 27 | |
| 28 | /* |
| 29 | * flush_l1_v6 - l1 cache clean invalidate |
| 30 | * r0 - dest |
| 31 | */ |
| 32 | .global flush_l1_v6 |
| 33 | .type flush_l1_v6, %function |
| 34 | flush_l1_v6: |
| 35 | |
| 36 | stmfd sp!, {r1-r12} |
| 37 | |
| 38 | mcr p15, 0, r0, c7, c10, 5 /* @ data memory barrier */ |
| 39 | mcr p15, 0, r0, c7, c14, 1 /* @ clean & invalidate D line */ |
| 40 | mcr p15, 0, r0, c7, c10, 4 /* @ data sync barrier */ |
| 41 | |
| 42 | ldmfd sp!, {r1-r12} |
| 43 | bx lr |
| 44 | |
| 45 | |
| 46 | /* |
| 47 | * flush_l1_v7 - l1 cache clean invalidate |
| 48 | * r0 - dest |
| 49 | */ |
| 50 | .global flush_l1_v7 |
| 51 | .type flush_l1_v7, %function |
| 52 | flush_l1_v7: |
| 53 | |
| 54 | stmfd sp!, {r1-r12} |
| 55 | |
| 56 | dmb /* @data memory barrier */ |
| 57 | mcr p15, 0, r0, c7, c14, 1 /* @ clean & invalidate D line */ |
| 58 | dsb /* @data sync barrier */ |
| 59 | |
| 60 | ldmfd sp!, {r1-r12} |
| 61 | bx lr |