Andrew F. Davis | 864e285 | 2020-07-15 17:02:36 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/ |
| 4 | * Andrew F. Davis <afd@ti.com> |
| 5 | */ |
| 6 | |
| 7 | #include <config.h> |
| 8 | #include <linux/linkage.h> |
| 9 | |
| 10 | #if defined(CONFIG_SPL_BUILD) |
| 11 | ENTRY(__asm_invalidate_l3_dcache) |
| 12 | /* Invalidate SPL address range */ |
| 13 | mov x0, #CONFIG_SPL_TEXT_BASE |
| 14 | add x1, x0, #CONFIG_SPL_MAX_SIZE |
| 15 | b __asm_flush_dcache_range |
| 16 | ENDPROC(__asm_invalidate_l3_dcache) |
| 17 | |
| 18 | ENTRY(__asm_flush_l3_dcache) |
| 19 | /* Flush SPL address range */ |
| 20 | mov x0, #CONFIG_SPL_TEXT_BASE |
| 21 | add x1, x0, #CONFIG_SPL_MAX_SIZE |
| 22 | b __asm_flush_dcache_range |
| 23 | ENDPROC(__asm_flush_l3_dcache) |
| 24 | #endif |