]> git.ipfire.org Git - people/ms/u-boot.git/blob - drivers/pch/pch9.c
dm: pch: Remove pch_get_version op
[people/ms/u-boot.git] / drivers / pch / pch9.c
1 /*
2 * Copyright (C) 2014 Google, Inc
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7 #include <common.h>
8 #include <dm.h>
9 #include <pch.h>
10
11 #define SBASE_ADDR 0x54
12
13 static int pch9_get_sbase(struct udevice *dev, ulong *sbasep)
14 {
15 uint32_t sbase_addr;
16
17 dm_pci_read_config32(dev, SBASE_ADDR, &sbase_addr);
18 *sbasep = sbase_addr & 0xfffffe00;
19
20 return 0;
21 }
22
23 static const struct pch_ops pch9_ops = {
24 .get_sbase = pch9_get_sbase,
25 };
26
27 static const struct udevice_id pch9_ids[] = {
28 { .compatible = "intel,pch9" },
29 { }
30 };
31
32 U_BOOT_DRIVER(pch9_drv) = {
33 .name = "intel-pch9",
34 .id = UCLASS_PCH,
35 .of_match = pch9_ids,
36 .ops = &pch9_ops,
37 };