u-boot-brain/drivers/pch/pch9.c
Bin Meng d02be99e67 dm: pch: Remove pch_get_version op
pch_get_version op was only used by the ich spi controller driver,
and does not really provide a good identification of pch controller
so far, since we see plenty of Intel PCH chipsets and one differs
from another a lot, which is not simply either a PCHV_7 or PCHV_9.
Now that ich spi controller driver was updated to not get such info
from pch, the pch_get_version op is useless now.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2016-02-05 12:47:21 +08:00

38 lines
633 B
C

/*
* 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 const struct pch_ops pch9_ops = {
.get_sbase = pch9_get_sbase,
};
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,
};