xref: /optee_os/core/include/drivers/mvebu_uart.h (revision fbe66cf83199aa6a2aca9f93384cf1ad9185a5f6)
11bb92983SJerome Forissier /* SPDX-License-Identifier: BSD-2-Clause */
224bb7516Swangwen /*
324bb7516Swangwen  * Copyright (C) 2017 Marvell International Ltd.
424bb7516Swangwen  * All rights reserved.
524bb7516Swangwen  *
624bb7516Swangwen  * Redistribution and use in source and binary forms, with or without
724bb7516Swangwen  * modification, are permitted provided that the following conditions are met:
824bb7516Swangwen  *
924bb7516Swangwen  * 1. Redistributions of source code must retain the above copyright notice,
1024bb7516Swangwen  * this list of conditions and the following disclaimer.
1124bb7516Swangwen  *
1224bb7516Swangwen  * 2. Redistributions in binary form must reproduce the above copyright notice,
1324bb7516Swangwen  * this list of conditions and the following disclaimer in the documentation
1424bb7516Swangwen  * and/or other materials provided with the distribution.
1524bb7516Swangwen  *
1624bb7516Swangwen  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1724bb7516Swangwen  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1824bb7516Swangwen  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1924bb7516Swangwen  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
2024bb7516Swangwen  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2124bb7516Swangwen  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2224bb7516Swangwen  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2324bb7516Swangwen  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2424bb7516Swangwen  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2524bb7516Swangwen  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2624bb7516Swangwen  * POSSIBILITY OF SUCH DAMAGE.
2724bb7516Swangwen  */
28*fbe66cf8SEtienne Carriere #ifndef __DRIVERS_MVEBU_UART_H
29*fbe66cf8SEtienne Carriere #define __DRIVERS_MVEBU_UART_H
3024bb7516Swangwen 
3124bb7516Swangwen #include <types_ext.h>
3224bb7516Swangwen #include <drivers/serial.h>
3324bb7516Swangwen 
3424bb7516Swangwen struct mvebu_uart_data {
3524bb7516Swangwen 	struct io_pa_va base;
3624bb7516Swangwen 	struct serial_chip chip;
3724bb7516Swangwen };
3824bb7516Swangwen 
3924bb7516Swangwen void mvebu_uart_init(struct mvebu_uart_data *pd, paddr_t pbase,
4024bb7516Swangwen 		uint32_t uart_clk, uint32_t baud_rate);
4124bb7516Swangwen 
42*fbe66cf8SEtienne Carriere #endif /* __DRIVERS_MVEBU_UART_H */
43