2 * Copyright (c) 2016 IBM Corporation.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
11 #include "../include/asm/opal-api.h"
17 /* r3 is the fdt ptr */
28 #define OPAL_CALL(name, token) \
41 /* Set opal return address */
42 ld r11,opal_return@got(r2)
46 /* switch to BE when we enter OPAL */
51 /* load the opal call entry point and base */
67 OPAL_CALL(opal_console_write, OPAL_CONSOLE_WRITE);
68 OPAL_CALL(opal_console_read, OPAL_CONSOLE_READ);
69 OPAL_CALL(opal_console_write_buffer_space, OPAL_CONSOLE_WRITE_BUFFER_SPACE);
70 OPAL_CALL(opal_poll_events, OPAL_POLL_EVENTS);
71 OPAL_CALL(opal_console_flush, OPAL_CONSOLE_FLUSH);