Commit 81afac12 authored by Simon Glass's avatar Simon Glass Committed by Bin Meng

dm: x86: Add a driver for Intel PCH9

At some point we may need to distinguish between different types of PCHs,
but for existing supported platforms we only need to worry about version 7
and version 9 bridges. Add a driver for the PCH9.
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
parent 1ff4f321
......@@ -4,3 +4,4 @@
obj-y += pch-uclass.o
obj-y += pch7.o
obj-y += pch9.o
/*
* Copyright (C) 2014 Google, Inc
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <dm.h>
#include <pch.h>
#define SBASE_ADDR 0x54
static int pch9_get_sbase(struct udevice *dev, ulong *sbasep)
{
uint32_t sbase_addr;
dm_pci_read_config32(dev, SBASE_ADDR, &sbase_addr);
*sbasep = sbase_addr & 0xfffffe00;
return 0;
}
static enum pch_version pch9_get_version(struct udevice *dev)
{
return PCHV_9;
}
static const struct pch_ops pch9_ops = {
.get_sbase = pch9_get_sbase,
.get_version = pch9_get_version,
};
static const struct udevice_id pch9_ids[] = {
{ .compatible = "intel,pch9" },
{ }
};
U_BOOT_DRIVER(pch9_drv) = {
.name = "intel-pch9",
.id = UCLASS_PCH,
.of_match = pch9_ids,
.ops = &pch9_ops,
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment