1877cf3ffSSoby Mathew /* 2*a6f340feSSoby Mathew * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. 3877cf3ffSSoby Mathew * 482cb2c1aSdp-arm * SPDX-License-Identifier: BSD-3-Clause 5877cf3ffSSoby Mathew */ 6877cf3ffSSoby Mathew 721568304SDimitris Papastamos #include <console.h> 8877cf3ffSSoby Mathew #include <platform.h> 9*a6f340feSSoby Mathew #include <platform_sp_min.h> 10d50ece03SAntonio Nino Diaz #include <xlat_mmu_helpers.h> 11877cf3ffSSoby Mathew 12877cf3ffSSoby Mathew /* 13877cf3ffSSoby Mathew * The following platform setup functions are weakly defined. They 14877cf3ffSSoby Mathew * provide typical implementations that may be re-used by multiple 15877cf3ffSSoby Mathew * platforms but may also be overridden by a platform if required. 16877cf3ffSSoby Mathew */ 17877cf3ffSSoby Mathew #pragma weak bl32_plat_enable_mmu 1821568304SDimitris Papastamos #pragma weak sp_min_plat_runtime_setup 19877cf3ffSSoby Mathew 20877cf3ffSSoby Mathew void bl32_plat_enable_mmu(uint32_t flags) 21877cf3ffSSoby Mathew { 22877cf3ffSSoby Mathew enable_mmu_secure(flags); 23877cf3ffSSoby Mathew } 2421568304SDimitris Papastamos 2521568304SDimitris Papastamos void sp_min_plat_runtime_setup(void) 2621568304SDimitris Papastamos { 2721568304SDimitris Papastamos /* 2821568304SDimitris Papastamos * Finish the use of console driver in SP_MIN so that any runtime logs 2921568304SDimitris Papastamos * from SP_MIN will be suppressed. 3021568304SDimitris Papastamos */ 3121568304SDimitris Papastamos console_uninit(); 3221568304SDimitris Papastamos } 33*a6f340feSSoby Mathew 34*a6f340feSSoby Mathew #if !ERROR_DEPRECATED 35*a6f340feSSoby Mathew 36*a6f340feSSoby Mathew #pragma weak sp_min_early_platform_setup2 37*a6f340feSSoby Mathew 38*a6f340feSSoby Mathew void sp_min_early_platform_setup2(u_register_t arg0, u_register_t arg1, 39*a6f340feSSoby Mathew u_register_t arg2, u_register_t arg3) 40*a6f340feSSoby Mathew { 41*a6f340feSSoby Mathew sp_min_early_platform_setup((void *) arg0, (void *)arg1); 42*a6f340feSSoby Mathew } 43*a6f340feSSoby Mathew #endif 44