summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2018-07-29 21:30:54 +0200
committerFelix Held <felix-coreboot@felixheld.de>2018-08-01 12:22:10 +0000
commitfe68a775d53a60c1fdfdf6d89988210865239321 (patch)
tree258e14a0d594c4f4e02fc69e9d2b8dcd10b976bf /src/northbridge
parent8908931f1ea458f0482265583746788589506380 (diff)
downloadcoreboot-fe68a775d53a60c1fdfdf6d89988210865239321.tar.xz
northbridge/sandybridge: add MCHBAR32 AND/OR/AND_OR access macros
Change-Id: I5d91674ebd281a595e7c0462671f4715ca09cb5c Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/27723 Reviewed-by: Patrick Rudolph <siro@das-labor.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/intel/sandybridge/sandybridge.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/northbridge/intel/sandybridge/sandybridge.h b/src/northbridge/intel/sandybridge/sandybridge.h
index 3c082f1365..faa9cd905d 100644
--- a/src/northbridge/intel/sandybridge/sandybridge.h
+++ b/src/northbridge/intel/sandybridge/sandybridge.h
@@ -125,7 +125,10 @@ enum platform_type {
#define MCHBAR8(x) (*((volatile u8 *)(DEFAULT_MCHBAR + (x))))
#define MCHBAR16(x) (*((volatile u16 *)(DEFAULT_MCHBAR + (x))))
#define MCHBAR32(x) (*((volatile u32 *)(DEFAULT_MCHBAR + (x))))
-#define MCHBAR32_OR(x, or) MCHBAR32(x) = (MCHBAR32(x) | (or))
+#define MCHBAR32_OR(x, or) (MCHBAR32(x) = (MCHBAR32(x) | (or)))
+#define MCHBAR32_AND(x, and) (MCHBAR32(x) = (MCHBAR32(x) & (and)))
+#define MCHBAR32_AND_OR(x, and, or) \
+ (MCHBAR32(x) = (MCHBAR32(x) & (and)) | (or))
#define SSKPD 0x5d14 /* 16bit (scratchpad) */
#define BIOS_RESET_CPL 0x5da8 /* 8bit */