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