1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (c) 2016 IBM Corporation.
7 #include "../include/asm/opal-api.h"
13 /* r3 is the fdt ptr */
24 #define OPAL_CALL(name, token) \
37 /* Set opal return address */
38 ld r11,opal_return@got(r2)
42 /* switch to BE when we enter OPAL */
47 /* load the opal call entry point and base */
63 OPAL_CALL(opal_console_write, OPAL_CONSOLE_WRITE);
64 OPAL_CALL(opal_console_read, OPAL_CONSOLE_READ);
65 OPAL_CALL(opal_console_write_buffer_space, OPAL_CONSOLE_WRITE_BUFFER_SPACE);
66 OPAL_CALL(opal_poll_events, OPAL_POLL_EVENTS);
67 OPAL_CALL(opal_console_flush, OPAL_CONSOLE_FLUSH);