aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/intel/i945
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-11-02 22:21:54 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-04-21 09:01:28 +0000
commitf9c939029bf0c07bab7ce623b99d8abcc69f8362 (patch)
tree0d4e2c812867a8e0dd96175bb8fc0c5a0c4db4dd /src/northbridge/intel/i945
parent9dc1c51db47f43190c9396e9dd77f051530265a4 (diff)
nb/intel: Use get_int_option()
Change-Id: I8896531d6df729709456bc6e79e02136d9ea7b3b Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47112 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/northbridge/intel/i945')
-rw-r--r--src/northbridge/intel/i945/early_init.c3
-rw-r--r--src/northbridge/intel/i945/gma.c7
2 files changed, 2 insertions, 8 deletions
diff --git a/src/northbridge/intel/i945/early_init.c b/src/northbridge/intel/i945/early_init.c
index 3c5917b126..b9c944169f 100644
--- a/src/northbridge/intel/i945/early_init.c
+++ b/src/northbridge/intel/i945/early_init.c
@@ -149,8 +149,7 @@ static void i945_setup_bars(void)
pci_write_config32(HOST_BRIDGE, X60BAR, DEFAULT_X60BAR | 1);
/* vram size from CMOS option */
- if (get_option(&gfxsize, "gfx_uma_size") != CB_SUCCESS)
- gfxsize = 2; /* 2 for 8MB */
+ gfxsize = get_int_option("gfx_uma_size", 2); /* 2 for 8MB */
/* make sure no invalid setting is used */
if (gfxsize > 6)
gfxsize = 2;
diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c
index e00026a131..8aa722ccd6 100644
--- a/src/northbridge/intel/i945/gma.c
+++ b/src/northbridge/intel/i945/gma.c
@@ -707,15 +707,10 @@ static void gma_func0_disable(struct device *dev)
static void gma_func1_init(struct device *dev)
{
- u8 val;
-
if (!CONFIG(NO_GFX_INIT))
pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER);
- if (get_option(&val, "tft_brightness") == CB_SUCCESS)
- pci_write_config8(dev, 0xf4, val);
- else
- pci_write_config8(dev, 0xf4, 0xff);
+ pci_write_config8(dev, 0xf4, get_int_option("tft_brightness", 0xff));
}
static void gma_generate_ssdt(const struct device *device)