f55f3e67be
Use single ID value for HSUART1. Testing on Galileo: * Edit the src/mainboard/intel/galileo/Makefile.inc file * Add "select ADD_FSP_PDAT_FILE" * Add "select ADD_FSP_RAW_BIN" * Add "select ADD_RMU_FILE" * Place the FSP.bin file in the location specified by CONFIG_FSP_FILE * Place the pdat.bin files in the location specified by CONFIG_FSP_PDAT_FILE * Place the rmu.bin file in the location specified by CONFIG_RMU_FILE * Testing successful if: * Debug serial output stays enabled after BS_DEV_RESOURCES state Change-Id: I38eca247f151e67c2b243a8a3bb21d9d1f4603de Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/13734 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
48 lines
1.4 KiB
C
48 lines
1.4 KiB
C
/*
|
|
* This file is part of the coreboot project.
|
|
*
|
|
* Copyright (C) 2003 Eric Biederman
|
|
* Copyright (C) 2006-2010 coresystems GmbH
|
|
* Copyright (C) 2015-2016 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.
|
|
*/
|
|
|
|
#include <console/uart.h>
|
|
#include <device/pci.h>
|
|
#include <device/pci_def.h>
|
|
#include <device/pci_ids.h>
|
|
#include <soc/pci_devs.h>
|
|
|
|
static void uart_read_resources(device_t dev)
|
|
{
|
|
struct resource *res;
|
|
|
|
/* Read the resources */
|
|
pci_dev_read_resources(dev);
|
|
|
|
/* Set the debug port configuration */
|
|
res = find_resource(dev, PCI_BASE_ADDRESS_0);
|
|
res->base = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
|
|
res->size = 0x100;
|
|
res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
|
|
}
|
|
|
|
static struct device_operations device_ops = {
|
|
.read_resources = &uart_read_resources,
|
|
.set_resources = &pci_dev_set_resources,
|
|
.enable_resources = &pci_dev_enable_resources,
|
|
};
|
|
|
|
static const struct pci_driver uart_driver __pci_driver = {
|
|
.ops = &device_ops,
|
|
.vendor = PCI_VENDOR_ID_INTEL,
|
|
.device = HSUART_DEVID,
|
|
};
|