summaryrefslogtreecommitdiff
path: root/src/northbridge/amd/pi
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2022-02-25 18:23:01 +0100
committerMartin L Roth <martinroth@google.com>2022-04-24 21:35:25 +0000
commit9d8df30950710635c9e7c099ef8d0c8d047658ca (patch)
tree3e8fff49857bc5edb5b9857a50df71fedc3cab65 /src/northbridge/amd/pi
parent5213b193c7afb4d1790b2d1ed8d36a4b672dfef5 (diff)
nb/amd/{agesa,pi}: Clean up some math expressions
Change-Id: Id6a1a6123dc0e2afd04213ece13363eed29f92c0 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55930 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Martin L Roth <martinroth@google.com>
Diffstat (limited to 'src/northbridge/amd/pi')
-rw-r--r--src/northbridge/amd/pi/00730F01/northbridge.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c
index 9889275758..52364a2e53 100644
--- a/src/northbridge/amd/pi/00730F01/northbridge.c
+++ b/src/northbridge/amd/pi/00730F01/northbridge.c
@@ -811,10 +811,10 @@ static void domain_read_resources(struct device *dev)
i, basek, limitk, sizek);
/* See if we need a hole from 0xa0000 (640K) to 0xfffff (1024K) */
- if ((basek < (0xa0000 >> 10) && (sizek > (0x100000 >> 10)))) {
- ram_resource(dev, (idx | i), basek, (0xa0000 >> 10) - basek);
+ if (basek < 640 && sizek > 1024) {
+ ram_resource(dev, (idx | i), basek, 640 - basek);
idx += 0x10;
- basek = 0x100000 >> 10;
+ basek = 1024;
sizek = limitk - basek;
}