summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/apollolake')
-rw-r--r--src/soc/intel/apollolake/uart.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/soc/intel/apollolake/uart.c b/src/soc/intel/apollolake/uart.c
index 27be4e65f9..f8c4aafec2 100644
--- a/src/soc/intel/apollolake/uart.c
+++ b/src/soc/intel/apollolake/uart.c
@@ -74,7 +74,7 @@ const struct uart_gpio_pad_config uart_gpio_pads[] = {
const int uart_max_index = ARRAY_SIZE(uart_gpio_pads);
-struct device *soc_uart_console_to_device(int uart_console)
+DEVTREE_CONST struct device *soc_uart_console_to_device(int uart_console)
{
/*
* if index is valid, this function will return corresponding structure
@@ -82,13 +82,13 @@ struct device *soc_uart_console_to_device(int uart_console)
*/
switch (uart_console) {
case 0:
- return (struct device *)PCH_DEV_UART0;
+ return pcidev_path_on_root(PCH_DEVFN_UART0);
case 1:
- return (struct device *)PCH_DEV_UART1;
+ return pcidev_path_on_root(PCH_DEVFN_UART1);
case 2:
- return (struct device *)PCH_DEV_UART2;
+ return pcidev_path_on_root(PCH_DEVFN_UART2);
case 3:
- return (struct device *)PCH_DEV_UART3;
+ return pcidev_path_on_root(PCH_DEVFN_UART3);
default:
printk(BIOS_ERR, "Invalid UART console index\n");
return NULL;