mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
skylake: igd: clean up igd.c
Remove unused constants, remove unused headers, and fix the use of acpi_slp_type variable. BUG=chrome-os-partner:40635 BRANCH=none TEST=emerge-glados coreboot Change-Id: I2d041f61605e0fc96483a1e825ab082668a0fa44 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: bc57147cb7fa3c38169fcdd62cc9e35d8058414a Original-Change-Id: If411ad50650e6705da7de50f5be8b1d414766a8c Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/297741 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/11564 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
a5d98889bd
commit
68957b33ed
1 changed files with 9 additions and 15 deletions
|
@ -26,21 +26,15 @@
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <device/pci.h>
|
#include <device/pci.h>
|
||||||
#include <device/pci_ids.h>
|
#include <device/pci_ids.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <reg_script.h>
|
|
||||||
#include <drivers/intel/gma/i915_reg.h>
|
#include <drivers/intel/gma/i915_reg.h>
|
||||||
#include <soc/cpu.h>
|
#include <soc/cpu.h>
|
||||||
#include <soc/pm.h>
|
#include <soc/pm.h>
|
||||||
#include <soc/ramstage.h>
|
#include <soc/ramstage.h>
|
||||||
#include <soc/systemagent.h>
|
#include <soc/systemagent.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <vendorcode/google/chromeos/chromeos.h>
|
#include <vendorcode/google/chromeos/chromeos.h>
|
||||||
|
|
||||||
#define GT_RETRY 1000
|
|
||||||
#define GT_CDCLK_337 0
|
|
||||||
#define GT_CDCLK_450 1
|
|
||||||
#define GT_CDCLK_540 2
|
|
||||||
#define GT_CDCLK_675 3
|
|
||||||
u32 map_oprom_vendev(u32 vendev)
|
u32 map_oprom_vendev(u32 vendev)
|
||||||
{
|
{
|
||||||
return SA_IGD_OPROM_VENDEV;
|
return SA_IGD_OPROM_VENDEV;
|
||||||
|
@ -80,16 +74,16 @@ static void igd_init(struct device *dev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Wait for any configured pre-graphics delay */
|
/* Wait for any configured pre-graphics delay */
|
||||||
if (acpi_slp_type != SLEEP_STATE_S3) {
|
if (!acpi_is_wakeup_s3()) {
|
||||||
#if IS_ENABLED(CONFIG_CHROMEOS)
|
#if IS_ENABLED(CONFIG_CHROMEOS)
|
||||||
if (developer_mode_enabled() || recovery_mode_enabled() ||
|
if (developer_mode_enabled() || recovery_mode_enabled() ||
|
||||||
vboot_wants_oprom())
|
vboot_wants_oprom())
|
||||||
mdelay(CONFIG_PRE_GRAPHICS_DELAY);
|
mdelay(CONFIG_PRE_GRAPHICS_DELAY);
|
||||||
#else
|
#else
|
||||||
mdelay(CONFIG_PRE_GRAPHICS_DELAY);
|
mdelay(CONFIG_PRE_GRAPHICS_DELAY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize PCI device, load/execute BIOS Option ROM */
|
/* Initialize PCI device, load/execute BIOS Option ROM */
|
||||||
pci_dev_init(dev);
|
pci_dev_init(dev);
|
||||||
|
|
||||||
|
@ -105,7 +99,7 @@ static void igd_init(struct device *dev)
|
||||||
gtt_write(DDI_BUF_CTL_A, DDI_BUF_IS_IDLE | DDI_A_4_LANES |
|
gtt_write(DDI_BUF_CTL_A, DDI_BUF_IS_IDLE | DDI_A_4_LANES |
|
||||||
DDI_INIT_DISPLAY_DETECTED);
|
DDI_INIT_DISPLAY_DETECTED);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_CHROMEOS */
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct device_operations igd_ops = {
|
static struct device_operations igd_ops = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue