southbridge/amd/{agesa,pi}/hudson/lpc.c: Sync together
Resync together, backporting a fix for the initialization of
8254 and 8259, as in commit 8d9a1bd5
. Also fix a typo and
reduce out useless whitespace differences.
Change-Id: I9a9b1fb9083c5417a8d061f90a89074f2a601ddf
Signed-off-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
Reported-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/10453
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
@@ -30,6 +30,8 @@
|
|||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <arch/ioapic.h>
|
#include <arch/ioapic.h>
|
||||||
#include <arch/acpi.h>
|
#include <arch/acpi.h>
|
||||||
|
#include <pc80/i8254.h>
|
||||||
|
#include <pc80/i8259.h>
|
||||||
#include "hudson.h"
|
#include "hudson.h"
|
||||||
|
|
||||||
static void lpc_init(device_t dev)
|
static void lpc_init(device_t dev)
|
||||||
@@ -79,6 +81,12 @@ static void lpc_init(device_t dev)
|
|||||||
* 1 tells cmos_init to always initialize the CMOS.
|
* 1 tells cmos_init to always initialize the CMOS.
|
||||||
*/
|
*/
|
||||||
cmos_init(0);
|
cmos_init(0);
|
||||||
|
|
||||||
|
/* Initialize i8259 pic */
|
||||||
|
setup_i8259 ();
|
||||||
|
|
||||||
|
/* Initialize i8254 timers */
|
||||||
|
setup_i8254 ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hudson_lpc_read_resources(device_t dev)
|
static void hudson_lpc_read_resources(device_t dev)
|
||||||
@@ -320,7 +328,6 @@ unsigned long acpi_fill_mcfg(unsigned long current)
|
|||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct pci_operations lops_pci = {
|
static struct pci_operations lops_pci = {
|
||||||
.set_subsystem = pci_dev_set_subsystem,
|
.set_subsystem = pci_dev_set_subsystem,
|
||||||
};
|
};
|
||||||
@@ -328,10 +335,10 @@ static struct pci_operations lops_pci = {
|
|||||||
static struct device_operations lpc_ops = {
|
static struct device_operations lpc_ops = {
|
||||||
.read_resources = hudson_lpc_read_resources,
|
.read_resources = hudson_lpc_read_resources,
|
||||||
.set_resources = hudson_lpc_set_resources,
|
.set_resources = hudson_lpc_set_resources,
|
||||||
|
.enable_resources = hudson_lpc_enable_resources,
|
||||||
#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
|
#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
|
||||||
.write_acpi_tables = acpi_write_hpet,
|
.write_acpi_tables = acpi_write_hpet,
|
||||||
#endif
|
#endif
|
||||||
.enable_resources = hudson_lpc_enable_resources,
|
|
||||||
.init = lpc_init,
|
.init = lpc_init,
|
||||||
.scan_bus = scan_lpc_bus,
|
.scan_bus = scan_lpc_bus,
|
||||||
.ops_pci = &lops_pci,
|
.ops_pci = &lops_pci,
|
||||||
|
@@ -28,8 +28,8 @@
|
|||||||
#include <pc80/mc146818rtc.h>
|
#include <pc80/mc146818rtc.h>
|
||||||
#include <pc80/isa-dma.h>
|
#include <pc80/isa-dma.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <arch/acpi.h>
|
|
||||||
#include <arch/ioapic.h>
|
#include <arch/ioapic.h>
|
||||||
|
#include <arch/acpi.h>
|
||||||
#include <pc80/i8254.h>
|
#include <pc80/i8254.h>
|
||||||
#include <pc80/i8259.h>
|
#include <pc80/i8259.h>
|
||||||
#include "hudson.h"
|
#include "hudson.h"
|
||||||
@@ -134,7 +134,7 @@ static void hudson_lpc_set_resources(struct device *dev)
|
|||||||
/**
|
/**
|
||||||
* @brief Enable resources for children devices
|
* @brief Enable resources for children devices
|
||||||
*
|
*
|
||||||
* @param dev the device whos children's resources are to be enabled
|
* @param dev the device whose children's resources are to be enabled
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static void hudson_lpc_enable_childrens_resources(device_t dev)
|
static void hudson_lpc_enable_childrens_resources(device_t dev)
|
||||||
@@ -316,18 +316,18 @@ static void hudson_lpc_enable_childrens_resources(device_t dev)
|
|||||||
pci_write_config8(dev, 0x74, wiosize);
|
pci_write_config8(dev, 0x74, wiosize);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long acpi_fill_mcfg(unsigned long current)
|
|
||||||
{
|
|
||||||
/* Just a dummy */
|
|
||||||
return current;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void hudson_lpc_enable_resources(device_t dev)
|
static void hudson_lpc_enable_resources(device_t dev)
|
||||||
{
|
{
|
||||||
pci_dev_enable_resources(dev);
|
pci_dev_enable_resources(dev);
|
||||||
hudson_lpc_enable_childrens_resources(dev);
|
hudson_lpc_enable_childrens_resources(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned long acpi_fill_mcfg(unsigned long current)
|
||||||
|
{
|
||||||
|
/* Just a dummy */
|
||||||
|
return current;
|
||||||
|
}
|
||||||
|
|
||||||
static struct pci_operations lops_pci = {
|
static struct pci_operations lops_pci = {
|
||||||
.set_subsystem = pci_dev_set_subsystem,
|
.set_subsystem = pci_dev_set_subsystem,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user