[coreboot-gerrit] Change in coreboot[master]: soc/intel/common, drivers/intel/gma: Move init_igd_opregion

Patrick Rudolph (Code Review) gerrit at coreboot.org
Sat Apr 15 12:55:25 CEST 2017


Patrick Rudolph has uploaded a new change for review. ( https://review.coreboot.org/19312 )

Change subject: soc/intel/common,drivers/intel/gma: Move init_igd_opregion
......................................................................

soc/intel/common,drivers/intel/gma: Move init_igd_opregion

Move init_igd_opregion to drivers/intel/gma.
This function will be used for all Intel IGDs.

Change-Id: I432a29988f2f29c0edfbcffecb3087f6c17726d5
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M src/drivers/intel/gma/Kconfig
M src/drivers/intel/gma/Makefile.inc
R src/drivers/intel/gma/opregion.c
M src/drivers/intel/gma/opregion.h
M src/soc/intel/apollolake/Kconfig
M src/soc/intel/apollolake/graphics.c
M src/soc/intel/common/Kconfig
M src/soc/intel/common/Makefile.inc
D src/soc/intel/common/opregion.h
M src/soc/intel/skylake/Kconfig
M src/soc/intel/skylake/include/fsp20/soc/ramstage.h
11 files changed, 11 insertions(+), 33 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/19312/1

diff --git a/src/drivers/intel/gma/Kconfig b/src/drivers/intel/gma/Kconfig
index df45083..fe42176 100644
--- a/src/drivers/intel/gma/Kconfig
+++ b/src/drivers/intel/gma/Kconfig
@@ -53,6 +53,9 @@
 	  supported platform with a choice seems to be Pineview, where the
 	  alternative is 100MHz vs. the default 96MHz.
 
+config INTEL_GMA_OPREGION
+	bool
+	default n
 
 config GFX_GMA
 	def_bool y
diff --git a/src/drivers/intel/gma/Makefile.inc b/src/drivers/intel/gma/Makefile.inc
index d4d6c08..5ac12ff 100644
--- a/src/drivers/intel/gma/Makefile.inc
+++ b/src/drivers/intel/gma/Makefile.inc
@@ -21,6 +21,7 @@
 endif
 ramstage-$(CONFIG_INTEL_GMA_ACPI) += acpi.c
 
+ramstage-$(CONFIG_INTEL_GMA_OPREGION) += opregion.c
 
 ifeq ($(CONFIG_MAINBOARD_USE_LIBGFXINIT),y)
 
diff --git a/src/soc/intel/common/opregion.c b/src/drivers/intel/gma/opregion.c
similarity index 100%
rename from src/soc/intel/common/opregion.c
rename to src/drivers/intel/gma/opregion.c
diff --git a/src/drivers/intel/gma/opregion.h b/src/drivers/intel/gma/opregion.h
index 3f94380..2bff98b 100644
--- a/src/drivers/intel/gma/opregion.h
+++ b/src/drivers/intel/gma/opregion.h
@@ -245,4 +245,7 @@
 	u8	coreblock_biossignon[155];
 } __attribute__((packed)) optionrom_vbt_t;
 
+/* Init IGD OpRegion */
+int init_igd_opregion(igd_opregion_t *opregion);
+
 #endif /* _COMMON_GMA_H_ */
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index dc639a2..70de80a 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -69,10 +69,10 @@
 	select PLATFORM_USES_FSP2_0
 	select HAVE_HARD_RESET
 	select SOC_INTEL_COMMON
-	select SOC_INTEL_COMMON_GFX_OPREGION
 	select SOC_INTEL_COMMON_BLOCK
 	select SOC_INTEL_COMMON_BLOCK_CSE
 	select ADD_VBT_DATA_FILE
+	select INTEL_GMA_OPREGION
 
 config CHROMEOS
 	select CHROMEOS_RAMOOPS_DYNAMIC
diff --git a/src/soc/intel/apollolake/graphics.c b/src/soc/intel/apollolake/graphics.c
index 9963d2c..06cd733 100644
--- a/src/soc/intel/apollolake/graphics.c
+++ b/src/soc/intel/apollolake/graphics.c
@@ -24,7 +24,7 @@
 #include <device/pci_ids.h>
 #include <soc/pci_devs.h>
 #include <soc/pci_ids.h>
-#include <soc/intel/common/opregion.h>
+#include <drivers/intel/gma/i915.h>
 
 uintptr_t fsp_soc_get_igd_bar(void)
 {
diff --git a/src/soc/intel/common/Kconfig b/src/soc/intel/common/Kconfig
index 919cb50..c2711a0 100644
--- a/src/soc/intel/common/Kconfig
+++ b/src/soc/intel/common/Kconfig
@@ -114,10 +114,6 @@
 	help
 	  The path and filename of the VBT binary.
 
-config SOC_INTEL_COMMON_GFX_OPREGION
-	bool
-	default n
-
 config SOC_INTEL_COMMON_SMI
 	bool
 	default n
diff --git a/src/soc/intel/common/Makefile.inc b/src/soc/intel/common/Makefile.inc
index acfd054..d87ffd6 100644
--- a/src/soc/intel/common/Makefile.inc
+++ b/src/soc/intel/common/Makefile.inc
@@ -31,7 +31,6 @@
 ramstage-$(CONFIG_MMA) += mma.c
 ramstage-$(CONFIG_SOC_INTEL_COMMON_ACPI_WAKE_SOURCE) += acpi_wake_source.c
 ramstage-y += vbt.c
-ramstage-$(CONFIG_SOC_INTEL_COMMON_GFX_OPREGION) += opregion.c
 ramstage-$(CONFIG_SOC_INTEL_COMMON_ACPI) += ./acpi/acpi.c
 ramstage-$(CONFIG_SOC_INTEL_COMMON_NHLT) += nhlt.c
 
diff --git a/src/soc/intel/common/opregion.h b/src/soc/intel/common/opregion.h
deleted file mode 100644
index bcffe6e..0000000
--- a/src/soc/intel/common/opregion.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2016 Intel Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef _COMMON_OPREGION_H_
-#define _COMMON_OPREGION_H_
-
-#include <drivers/intel/gma/opregion.h>
-
-/* Loads vbt and initializes opregion. Returns non-zero on success */
-int init_igd_opregion(igd_opregion_t *opregion);
-
-#endif /* _COMMON_OPREGION_H_ */
diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig
index 3024196..9b5e3d7 100644
--- a/src/soc/intel/skylake/Kconfig
+++ b/src/soc/intel/skylake/Kconfig
@@ -80,7 +80,7 @@
 	default y if MAINBOARD_USES_FSP2_0
 	select PLATFORM_USES_FSP2_0
 	select ADD_VBT_DATA_FILE
-	select SOC_INTEL_COMMON_GFX_OPREGION
+	select INTEL_GMA_OPREGION
 
 config USE_FSP1_1_DRIVER
 	bool "Build with FSP 1.1"
diff --git a/src/soc/intel/skylake/include/fsp20/soc/ramstage.h b/src/soc/intel/skylake/include/fsp20/soc/ramstage.h
index 79362ff..4a9b522 100644
--- a/src/soc/intel/skylake/include/fsp20/soc/ramstage.h
+++ b/src/soc/intel/skylake/include/fsp20/soc/ramstage.h
@@ -21,7 +21,7 @@
 #include <device/device.h>
 #include <fsp/api.h>
 #include <fsp/util.h>
-#include <soc/intel/common/opregion.h>
+#include <drivers/intel/gma/i915.h>
 
 #define FSP_SIL_UPD FSP_S_CONFIG
 #define FSP_MEM_UPD FSP_M_CONFIG

-- 
To view, visit https://review.coreboot.org/19312
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I432a29988f2f29c0edfbcffecb3087f6c17726d5
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>



More information about the coreboot-gerrit mailing list