xref: /rk3399_ARM-atf/drivers/renesas/rcar_gen5/scif/scif.c (revision 7cab2c233b38cf2a63d37d31da73f1d82f5efc3c)
1 /*
2  * Copyright (c) 2025, Renesas Electronics Corporation. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <stddef.h>
8 #include <stdint.h>
9 
10 #include <drivers/console.h>
11 #include "scif.h"
12 
13 /* SCIF/HSCIF */
14 #define HSCIF0_BASE	0xC0710000UL
15 
16 /* HSCIF */
17 #define HSCIF_BASE	HSCIF0_BASE
18 #define HSCIF_HSFTDR	(HSCIF_BASE + 0x000CU) /*  8 Transmit FIFO data register */
19 #define HSCIF_HSFSR	(HSCIF_BASE + 0x0010U) /* 16 Serial status register */
20 
console_rcar_init(uintptr_t base_addr,uint32_t uart_clk,uint32_t baud_rate)21 int console_rcar_init(uintptr_t base_addr, uint32_t uart_clk,
22 		      uint32_t baud_rate)
23 {
24 	scif_console_set_regs(HSCIF_HSFSR, HSCIF_HSFTDR);
25 
26 	return 1;
27 }
28