diff options
Diffstat (limited to 'roms/u-boot/arch/x86/cpu/intel_common/pch.c')
-rw-r--r-- | roms/u-boot/arch/x86/cpu/intel_common/pch.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/roms/u-boot/arch/x86/cpu/intel_common/pch.c b/roms/u-boot/arch/x86/cpu/intel_common/pch.c new file mode 100644 index 000000000..af82b64a1 --- /dev/null +++ b/roms/u-boot/arch/x86/cpu/intel_common/pch.c @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2016 Google, Inc + */ + +#include <common.h> +#include <dm.h> +#include <asm/pch_common.h> + +u32 pch_common_sir_read(struct udevice *dev, int idx) +{ + u32 data; + + dm_pci_write_config32(dev, SATA_SIRI, idx); + dm_pci_read_config32(dev, SATA_SIRD, &data); + + return data; +} + +void pch_common_sir_write(struct udevice *dev, int idx, u32 value) +{ + dm_pci_write_config32(dev, SATA_SIRI, idx); + dm_pci_write_config32(dev, SATA_SIRD, value); +} |