Antonio Nino Diaz | 0119324 | 2018-08-15 22:07:35 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef MESON_CONSOLE_H |
| 8 | #define MESON_CONSOLE_H |
| 9 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 10 | #include <drivers/console.h> |
Antonio Nino Diaz | 0119324 | 2018-08-15 22:07:35 +0100 | [diff] [blame] | 11 | |
Julius Werner | 53456fc | 2019-07-09 13:49:11 -0700 | [diff] [blame] | 12 | #ifndef __ASSEMBLER__ |
Antonio Nino Diaz | 0119324 | 2018-08-15 22:07:35 +0100 | [diff] [blame] | 13 | |
| 14 | #include <stdint.h> |
| 15 | |
Antonio Nino Diaz | 0119324 | 2018-08-15 22:07:35 +0100 | [diff] [blame] | 16 | /* |
| 17 | * Initialize a new meson console instance and register it with the console |
| 18 | * framework. The |console| pointer must point to storage that will be valid |
| 19 | * for the lifetime of the console, such as a global or static local variable. |
| 20 | * Its contents will be reinitialized from scratch. |
| 21 | * |
| 22 | * NOTE: The clock is actually fixed to 24 MHz. The argument is only there in |
| 23 | * order to make this function future-proof. |
| 24 | */ |
| 25 | int console_meson_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud, |
Andre Przywara | 0cd5344 | 2020-01-25 00:58:35 +0000 | [diff] [blame] | 26 | console_t *console); |
Antonio Nino Diaz | 0119324 | 2018-08-15 22:07:35 +0100 | [diff] [blame] | 27 | |
Julius Werner | 53456fc | 2019-07-09 13:49:11 -0700 | [diff] [blame] | 28 | #endif /*__ASSEMBLER__*/ |
Antonio Nino Diaz | 0119324 | 2018-08-15 22:07:35 +0100 | [diff] [blame] | 29 | |
| 30 | #endif /* MESON_CONSOLE_H */ |