diff options
author | Sven Schnelle <svens@stackframe.org> | 2011-06-12 14:30:10 +0200 |
---|---|---|
committer | Sven Schnelle <svens@stackframe.org> | 2011-06-15 19:40:24 +0200 |
commit | b629d14becd78c634ad412df726d964ed5d51214 (patch) | |
tree | a72a1cc46c1ba113c4445080c2d8bdb91c77dc6a /src/northbridge/intel/i945 | |
parent | d4dc9a5a039123f788848d1fa54926270b6c8805 (diff) |
i945 GMA: restore tft brightness from cmos
Change-Id: Iaf10f125425a1abcf17ffca1d6e246f955f941cc
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-on: http://review.coreboot.org/24
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/northbridge/intel/i945')
-rw-r--r-- | src/northbridge/intel/i945/gma.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c index a43ef259aa..340ddcd3a1 100644 --- a/src/northbridge/intel/i945/gma.c +++ b/src/northbridge/intel/i945/gma.c @@ -21,6 +21,7 @@ #include <device/device.h> #include <device/pci.h> #include <device/pci_ids.h> +#include <pc80/mc146818rtc.h> static void gma_func0_init(struct device *dev) { @@ -36,11 +37,17 @@ static void gma_func0_init(struct device *dev) static void gma_func1_init(struct device *dev) { u32 reg32; + u8 val; /* IGD needs to be Bus Master, also enable IO accesss */ reg32 = pci_read_config32(dev, PCI_COMMAND); pci_write_config32(dev, PCI_COMMAND, reg32 | PCI_COMMAND_MASTER | PCI_COMMAND_IO); + + if (!get_option(&val, "tft_brightness")) + pci_write_config8(dev, 0xf4, val); + else + pci_write_config8(dev, 0xf4, 0xff); } static void gma_set_subsystem(device_t dev, unsigned vendor, unsigned device) |