Bin Meng | 8a8694d | 2018-09-26 06:55:21 -0700 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> |
| 4 | */ |
| 5 | |
Simon Glass | 8f3f761 | 2019-11-14 12:57:42 -0700 | [diff] [blame] | 6 | #include <irq_func.h> |
Simon Glass | 274e0b0 | 2020-05-10 11:39:56 -0600 | [diff] [blame] | 7 | #include <asm/cache.h> |
Bin Meng | 8a8694d | 2018-09-26 06:55:21 -0700 | [diff] [blame] | 8 | |
| 9 | /* |
| 10 | * cleanup_before_linux() is called just before we call linux |
| 11 | * it prepares the processor for linux |
| 12 | * |
| 13 | * we disable interrupt and caches. |
| 14 | */ |
| 15 | int cleanup_before_linux(void) |
| 16 | { |
| 17 | disable_interrupts(); |
| 18 | |
Rick Chen | 842d580 | 2018-11-07 09:34:06 +0800 | [diff] [blame] | 19 | cache_flush(); |
Bin Meng | 8a8694d | 2018-09-26 06:55:21 -0700 | [diff] [blame] | 20 | |
| 21 | return 0; |
| 22 | } |