aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/uart.c
diff options
context:
space:
mode:
authorAamir Bohra <aamir.bohra@intel.com>2017-04-26 19:32:11 +0530
committerMartin Roth <martinroth@google.com>2017-05-09 17:58:42 +0200
commit935dff53b6e35a62db7b322c0d0867f667f0f0ae (patch)
tree5fe726ed88067cb237c952cdd2460f13c9d9bb5a /src/soc/intel/apollolake/uart.c
parent83f7baec308cffee0709e38c95e3b4726915e2ea (diff)
soc/intel/apollolake: Use common/block/uart code
Change-Id: I92c654d59f1642bcd7c95de80dcc641bf816b542 Signed-off-by: Aamir Bohra <aamir.bohra@intel.com> Reviewed-on: https://review.coreboot.org/19491 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/apollolake/uart.c')
-rw-r--r--src/soc/intel/apollolake/uart.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/soc/intel/apollolake/uart.c b/src/soc/intel/apollolake/uart.c
index 70d034f6cd..3db460a999 100644
--- a/src/soc/intel/apollolake/uart.c
+++ b/src/soc/intel/apollolake/uart.c
@@ -20,14 +20,12 @@
* shouldn't cause any fragmentation.
*/
-#include <console/uart.h>
#include <device/device.h>
#include <device/pci.h>
-#include <device/pci_ids.h>
-#include <soc/pci_ids.h>
+#include <intelblocks/uart.h>
#include <soc/pci_devs.h>
-static void aplk_uart_read_resources(struct device *dev)
+void pch_uart_read_resources(struct device *dev)
{
pci_dev_read_resources(dev);
@@ -39,23 +37,3 @@ static void aplk_uart_read_resources(struct device *dev)
CONFIG_CONSOLE_UART_BASE_ADDRESS >> 10, 4, 0);
}
}
-
-static struct device_operations uart_ops = {
- .read_resources = aplk_uart_read_resources,
- .set_resources = pci_dev_set_resources,
- .enable_resources = pci_dev_enable_resources,
- .init = pci_dev_init,
- .enable = DEVICE_NOOP
-};
-
-static const unsigned short uart_ids[] = {
- PCI_DEVICE_ID_APOLLOLAKE_UART0, PCI_DEVICE_ID_APOLLOLAKE_UART1,
- PCI_DEVICE_ID_APOLLOLAKE_UART2, PCI_DEVICE_ID_APOLLOLAKE_UART3,
- 0
-};
-
-static const struct pci_driver uart_driver __pci_driver = {
- .ops = &uart_ops,
- .vendor = PCI_VENDOR_ID_INTEL,
- .devices = uart_ids
-};