blob: f2ae1c44c1c256b0cfedaf3fd1f66b81ca30780c [file] [log] [blame]
Patrick Georgiac959032020-05-05 22:49:26 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Damien Zammit62477932015-05-03 21:34:38 +10002
3#ifndef NORTHBRIDGE_INTEL_PINEVIEW_H
4#define NORTHBRIDGE_INTEL_PINEVIEW_H
5
Damien Zammit62477932015-05-03 21:34:38 +10006#include <southbridge/intel/i82801gx/i82801gx.h>
7
Angel Pons24b1d8a2021-01-20 12:00:31 +01008#define DEFAULT_PMIOBAR 0x00000400
9
Damien Zammitf7060f12015-11-14 00:59:21 +110010#define BOOT_PATH_NORMAL 0
11#define BOOT_PATH_RESET 1
12#define BOOT_PATH_RESUME 2
13
Damien Zammit62477932015-05-03 21:34:38 +100014/* Device 0:0.0 PCI configuration space (Host Bridge) */
Angel Pons39ff7032020-03-09 21:39:44 +010015#define HOST_BRIDGE PCI_DEV(0, 0, 0)
Damien Zammit62477932015-05-03 21:34:38 +100016
Angel Pons0ddc2452020-07-22 11:40:46 +020017#include "hostbridge_regs.h"
Damien Zammit62477932015-05-03 21:34:38 +100018
19/* Device 0:1.0 PCI configuration space (PCI Express) */
20
Angel Pons39ff7032020-03-09 21:39:44 +010021#define PEGSTS 0x214 /* 32 bits */
Damien Zammit62477932015-05-03 21:34:38 +100022
Angel Pons39ff7032020-03-09 21:39:44 +010023/* Device 0:2.0 PCI configuration space (Integrated Graphics Device) */
24#define GMCH_IGD PCI_DEV(0, 2, 0)
Damien Zammit62477932015-05-03 21:34:38 +100025
26#define GMADR 0x18
27#define GTTADR 0x1c
28#define BSM 0x5c
Damien Zammit62477932015-05-03 21:34:38 +100029
Damien Zammit62477932015-05-03 21:34:38 +100030/*
31 * MCHBAR
32 */
33
Angel Pons24b1d8a2021-01-20 12:00:31 +010034#include <northbridge/intel/common/fixed_bars.h>
35
Angel Pons39ff7032020-03-09 21:39:44 +010036#define MCHBAR8_AND(x, and) (MCHBAR8(x) = MCHBAR8(x) & (and))
37#define MCHBAR16_AND(x, and) (MCHBAR16(x) = MCHBAR16(x) & (and))
38#define MCHBAR32_AND(x, and) (MCHBAR32(x) = MCHBAR32(x) & (and))
39#define MCHBAR8_OR(x, or) (MCHBAR8(x) = MCHBAR8(x) | (or))
40#define MCHBAR16_OR(x, or) (MCHBAR16(x) = MCHBAR16(x) | (or))
41#define MCHBAR32_OR(x, or) (MCHBAR32(x) = MCHBAR32(x) | (or))
42#define MCHBAR8_AND_OR(x, and, or) (MCHBAR8(x) = (MCHBAR8(x) & (and)) | (or))
43#define MCHBAR16_AND_OR(x, and, or) (MCHBAR16(x) = (MCHBAR16(x) & (and)) | (or))
44#define MCHBAR32_AND_OR(x, and, or) (MCHBAR32(x) = (MCHBAR32(x) & (and)) | (or))
45
46/* As there are many registers, define them on a separate file */
47
48#include "mchbar_regs.h"
Damien Zammit62477932015-05-03 21:34:38 +100049
Angel Pons39ff7032020-03-09 21:39:44 +010050void pineview_early_init(void);
Damien Zammitf7060f12015-11-14 00:59:21 +110051u32 decode_igd_memory_size(const u32 gms);
52u32 decode_igd_gtt_size(const u32 gsm);
Damien Zammitf7060f12015-11-14 00:59:21 +110053
Arthur Heymansc6ff1ac2019-01-11 16:06:19 +010054/* Mainboard romstage callback functions */
Arthur Heymansc6ff1ac2019-01-11 16:06:19 +010055void get_mb_spd_addrmap(u8 *spd_addr_map);
56void mb_pirq_setup(void); /* optional */
57
Damien Zammit62477932015-05-03 21:34:38 +100058#endif /* NORTHBRIDGE_INTEL_PINEVIEW_H */