diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2019-02-22 12:05:16 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-02-25 11:18:32 +0000 |
commit | b94ecc4e696cc63e2772657c915670c3fe057f5c (patch) | |
tree | 60dc5bb25d18e29a52fadf89542f702f2732334a /src/soc/cavium/common/include | |
parent | 99850600d06f837759d2404f03dc908969ed42c3 (diff) | |
download | coreboot-b94ecc4e696cc63e2772657c915670c3fe057f5c.tar.xz |
soc/cavium/common: Make ecam0_get_bar_val common
Move ecam0_get_bar_val into the common folder and make it public.
Compile it for romstage and ramstage.
To be used by romstage PCI code.
Tested on OpenCellular Elgon.
Change-Id: I18b1ede56795bf8c1f9476592291b8ea610eccd4
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/31566
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/soc/cavium/common/include')
-rw-r--r-- | src/soc/cavium/common/include/soc/ecam.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/soc/cavium/common/include/soc/ecam.h b/src/soc/cavium/common/include/soc/ecam.h new file mode 100644 index 0000000000..16e3d27a62 --- /dev/null +++ b/src/soc/cavium/common/include/soc/ecam.h @@ -0,0 +1,30 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2018-present Facebook, Inc. + * Copyright 2019 9elements Agency GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __COREBOOT_SRC_SOC_CAVIUM_COMMON_INCLUDE_SOC_ECAM_H +#define __COREBOOT_SRC_SOC_CAVIUM_COMMON_INCLUDE_SOC_ECAM_H + +#ifdef __SIMPLE_DEVICE__ +#include <device/pci_type.h> + +uint64_t ecam0_get_bar_val(pci_devfn_t dev, u8 bar); +#else +#include <device/device.h> + +uint64_t ecam0_get_bar_val(struct device *dev, u8 bar); +#endif + +#endif |