3rdparty/fsp: Update submodule to upstream master
[coreboot2.git] / src / northbridge / intel / pineview / bootblock.c
blob498d21aa5d8e809995846e370abf4fdebd0391c7
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <arch/bootblock.h>
4 #include <assert.h>
5 #include <device/pci_ops.h>
6 #include <types.h>
7 #include "pineview.h"
9 static uint32_t encode_pciexbar_length(void)
11 switch (CONFIG_ECAM_MMCONF_BUS_NUMBER) {
12 case 256: return 0 << 1;
13 case 128: return 1 << 1;
14 case 64: return 2 << 1;
15 default: return dead_code_t(uint32_t);
19 void bootblock_early_northbridge_init(void)
21 const uint32_t reg32 = CONFIG_ECAM_MMCONF_BASE_ADDRESS | encode_pciexbar_length() | 1;
22 pci_io_write_config32(HOST_BRIDGE, PCIEXBAR, reg32);