summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/include/intelblocks
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2021-01-06 20:30:35 -0800
committerPatrick Georgi <pgeorgi@google.com>2021-01-11 07:41:22 +0000
commit4fa183fe79f5f7fc66750ee0bd2376f5c99ed9b0 (patch)
tree418460da0b63b06d9fe619dccb4b4601977b0a5d /src/soc/intel/common/block/include/intelblocks
parentb1fa231d76a5bb41a61a1c2907ab27e8ef9999bb (diff)
soc/intel/uart: Drop SoC callback `soc_uart_console_to_device`
This change renames `struct uart_gpio_pad_config` to `struct uart_controller_config` and adds a new parameter devfn (which expects devfn for the UART controller corresponding to the index in PCI_DEVFN() format). This gets rid of the SoC callback to get `struct device` pointer to the UART controller device. Change-Id: Id0712a0038f2cc1a61b8b5a58fa155f14e7949a5 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49212 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/common/block/include/intelblocks')
-rw-r--r--src/soc/intel/common/block/include/intelblocks/uart.h21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/soc/intel/common/block/include/intelblocks/uart.h b/src/soc/intel/common/block/include/intelblocks/uart.h
index fd65f4c85e..c3a22bc96b 100644
--- a/src/soc/intel/common/block/include/intelblocks/uart.h
+++ b/src/soc/intel/common/block/include/intelblocks/uart.h
@@ -10,8 +10,10 @@
#define MAX_GPIO_PAD_PER_UART 2
-struct uart_gpio_pad_config {
+struct uart_controller_config {
int console_index;
+ /* devfn in PCI_DEVFN() format */
+ unsigned int devfn;
struct pad_config gpios[MAX_GPIO_PAD_PER_UART];
};
@@ -55,21 +57,4 @@ void uart_bootblock_init(void);
*/
const struct device *uart_get_device(void);
-/**************************** SoC callbacks ***********************************/
-
-/*
- * SoC should implement soc_uart_console_to_device() function to
- * get UART debug controller device structure based on console number
- * Caller needs to check proper UART console index supported by SoC.
- * If wrong UART console index is passed to function, it'll return NULL.
- *
- * Input:
- * UART console index selected in config
- *
- * Returns:
- * Pointer to device structure = If device has a UART debug controller.
- * NULL = otherwise
- */
-DEVTREE_CONST struct device *soc_uart_console_to_device(int uart_console);
-
#endif /* SOC_INTEL_COMMON_BLOCK_UART_H */