1*018358fcSMarek Vasut /* 2*018358fcSMarek Vasut * Copyright (c) 2015-2019, Renesas Electronics Corporation. All rights reserved. 3*018358fcSMarek Vasut * 4*018358fcSMarek Vasut * SPDX-License-Identifier: BSD-3-Clause 5*018358fcSMarek Vasut */ 6*018358fcSMarek Vasut 7*018358fcSMarek Vasut #ifndef RCAR_PRINTF_H 8*018358fcSMarek Vasut #define RCAR_PRINTF_H 9*018358fcSMarek Vasut 10*018358fcSMarek Vasut #define CONSOLE_T_RCAR_BASE CONSOLE_T_DRVDATA 11*018358fcSMarek Vasut 12*018358fcSMarek Vasut #ifndef __ASSEMBLY__ 13*018358fcSMarek Vasut 14*018358fcSMarek Vasut #include <stdint.h> 15*018358fcSMarek Vasut 16*018358fcSMarek Vasut typedef struct { 17*018358fcSMarek Vasut console_t console; 18*018358fcSMarek Vasut uintptr_t base; 19*018358fcSMarek Vasut } console_rcar_t; 20*018358fcSMarek Vasut 21*018358fcSMarek Vasut /* 22*018358fcSMarek Vasut * Initialize a new rcar console instance and register it with the console 23*018358fcSMarek Vasut * framework. The |console| pointer must point to storage that will be valid 24*018358fcSMarek Vasut * for the lifetime of the console, such as a global or static local variable. 25*018358fcSMarek Vasut * Its contents will be reinitialized from scratch. 26*018358fcSMarek Vasut */ 27*018358fcSMarek Vasut int console_rcar_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud, 28*018358fcSMarek Vasut console_rcar_t *console); 29*018358fcSMarek Vasut 30*018358fcSMarek Vasut #endif /*__ASSEMBLY__*/ 31*018358fcSMarek Vasut 32*018358fcSMarek Vasut #endif /* RCAR_PRINTF_H */ 33