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