1*54fd6939SJiyong Park /* 2*54fd6939SJiyong Park * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. 3*54fd6939SJiyong Park * 4*54fd6939SJiyong Park * SPDX-License-Identifier: BSD-3-Clause 5*54fd6939SJiyong Park */ 6*54fd6939SJiyong Park 7*54fd6939SJiyong Park #ifndef MESON_CONSOLE_H 8*54fd6939SJiyong Park #define MESON_CONSOLE_H 9*54fd6939SJiyong Park 10*54fd6939SJiyong Park #include <drivers/console.h> 11*54fd6939SJiyong Park 12*54fd6939SJiyong Park #ifndef __ASSEMBLER__ 13*54fd6939SJiyong Park 14*54fd6939SJiyong Park #include <stdint.h> 15*54fd6939SJiyong Park 16*54fd6939SJiyong Park /* 17*54fd6939SJiyong Park * Initialize a new meson console instance and register it with the console 18*54fd6939SJiyong Park * framework. The |console| pointer must point to storage that will be valid 19*54fd6939SJiyong Park * for the lifetime of the console, such as a global or static local variable. 20*54fd6939SJiyong Park * Its contents will be reinitialized from scratch. 21*54fd6939SJiyong Park * 22*54fd6939SJiyong Park * NOTE: The clock is actually fixed to 24 MHz. The argument is only there in 23*54fd6939SJiyong Park * order to make this function future-proof. 24*54fd6939SJiyong Park */ 25*54fd6939SJiyong Park int console_meson_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud, 26*54fd6939SJiyong Park console_t *console); 27*54fd6939SJiyong Park 28*54fd6939SJiyong Park #endif /*__ASSEMBLER__*/ 29*54fd6939SJiyong Park 30*54fd6939SJiyong Park #endif /* MESON_CONSOLE_H */ 31