blob: 78feb3e2467f0ec85cd53a5890e566a39963c621 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2017 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef SOC_INTEL_COMMON_BLOCK_UART_H
#define SOC_INTEL_COMMON_BLOCK_UART_H
#include <arch/io.h>
#include <device/device.h>
#include <stdint.h>
/*
* Common routine to initialize UART controller PCI config space, take it out of
* reset and configure M/N dividers.
*/
void uart_common_init(device_t dev, uintptr_t baseaddr);
/*
* Check if UART debug controller is initialized
* Returns:
* true = If debug controller PCI config space is initialized and device is
* out of reset
* false = otherwise
*/
bool uart_debug_controller_is_initialized(void);
/*
* Check if dev corresponds to UART debug port controller.
*
* Returns:
* true: UART dev is debug port
* false: otherwise
*/
bool uart_is_debug_controller(struct device *dev);
/**************************** SoC callbacks ***********************************/
void pch_uart_read_resources(struct device *dev);
/*
* Check if UART debug port controller needs to be initialized on resume.
*
* Returns:
* true = when SoC wants common code to do the UART debug port initialization
* false = otherwise
*/
bool pch_uart_init_debug_controller_on_resume(void);
/*
* Get UART debug controller device structure
*
* Returns:
* Pointer to device structure = If device has a UART debug controller.
* NULL = otherwise
*/
device_t pch_uart_get_debug_controller(void);
#endif /* SOC_INTEL_COMMON_BLOCK_UART_H */
|