[coreboot-gerrit] Change in coreboot[master]: drivers/intel/gma/opregion: migrate from nb/common

Matt DeVillier (Code Review) gerrit at coreboot.org
Fri Jul 14 20:33:28 CEST 2017


Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/20582


Change subject: drivers/intel/gma/opregion: migrate from nb/common
......................................................................

drivers/intel/gma/opregion: migrate from nb/common

Migrate opregion code from northbridge/intel/common to
drivers/intel/gma in preparation for consolidation with
soc/intel/common opregion code. Rename init_igd_opregion()
for clarity and disambiguation with other implementations.

Change-Id: I2d0bae98f04dbe7e896ca34e15f24d29b6aa2ed6
Signed-off-by: Matt DeVillier <matt.devillier at gmail.com>
---
M src/drivers/intel/gma/Kconfig
M src/drivers/intel/gma/Makefile.inc
R src/drivers/intel/gma/gma_opregion.c
R src/drivers/intel/gma/gma_opregion.h
M src/northbridge/intel/common/Kconfig
M src/northbridge/intel/common/Makefile.inc
M src/northbridge/intel/fsp_sandybridge/Kconfig
M src/northbridge/intel/fsp_sandybridge/gma.c
M src/northbridge/intel/haswell/Kconfig
M src/northbridge/intel/haswell/gma.c
M src/northbridge/intel/nehalem/Kconfig
M src/northbridge/intel/nehalem/gma.c
M src/northbridge/intel/sandybridge/Kconfig
M src/northbridge/intel/sandybridge/gma.c
14 files changed, 25 insertions(+), 26 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/20582/1

diff --git a/src/drivers/intel/gma/Kconfig b/src/drivers/intel/gma/Kconfig
index 1e60a42..3e513fc 100644
--- a/src/drivers/intel/gma/Kconfig
+++ b/src/drivers/intel/gma/Kconfig
@@ -32,6 +32,9 @@
 	bool
 	default n
 
+config INTEL_GMA_OPREGION
+	def_bool n
+
 config INTEL_GMA_SSC_ALTERNATE_REF
 	bool
 	default n
diff --git a/src/drivers/intel/gma/Makefile.inc b/src/drivers/intel/gma/Makefile.inc
index 50494e1..e185e63 100644
--- a/src/drivers/intel/gma/Makefile.inc
+++ b/src/drivers/intel/gma/Makefile.inc
@@ -20,7 +20,7 @@
 endif
 ramstage-$(CONFIG_INTEL_GMA_ACPI) += acpi.c
 ramstage-$(CONFIG_INTEL_GMA_ACPI) += opregion.c
-
+ramstage-$(CONFIG_INTEL_GMA_OPREGION) += gma_opregion.c
 
 ifeq ($(CONFIG_MAINBOARD_USE_LIBGFXINIT),y)
 
diff --git a/src/northbridge/intel/common/gma_opregion.c b/src/drivers/intel/gma/gma_opregion.c
similarity index 97%
rename from src/northbridge/intel/common/gma_opregion.c
rename to src/drivers/intel/gma/gma_opregion.c
index 43e7c16..1adcd35 100644
--- a/src/northbridge/intel/common/gma_opregion.c
+++ b/src/drivers/intel/gma/gma_opregion.c
@@ -19,7 +19,7 @@
 #include <arch/acpi.h>
 #include <device/pci.h>
 #include <device/pci_ids.h>
-#include <drivers/intel/gma/intel_bios.h>
+#include "intel_bios.h"
 #include "gma_opregion.h"
 
 static void *get_intel_vbios(void)
@@ -76,7 +76,7 @@
 }
 
 /* Initialize IGD OpRegion, called from ACPI code and OS drivers */
-enum cb_err init_igd_opregion(igd_opregion_t *opregion)
+enum cb_err intel_gma_init_igd_opregion(igd_opregion_t *opregion)
 {
 	enum cb_err ret;
 
diff --git a/src/northbridge/intel/common/gma_opregion.h b/src/drivers/intel/gma/gma_opregion.h
similarity index 70%
rename from src/northbridge/intel/common/gma_opregion.h
rename to src/drivers/intel/gma/gma_opregion.h
index 6e6d5c2..343e38a 100644
--- a/src/northbridge/intel/common/gma_opregion.h
+++ b/src/drivers/intel/gma/gma_opregion.h
@@ -13,12 +13,12 @@
  * GNU General Public License for more details.
  */
 
-#ifndef NORTHBRIDGE_INTEL_COMMON_GMA_OPREGION_H_
-#define NORTHBRIDGE_INTEL_COMMON_GMA_OPREGION_H_
+#ifndef INTEL_GMA_OPREGION_H_
+#define INTEL_GMA_OPREGION_H_
 
 #include <types.h>
-#include <drivers/intel/gma/opregion.h>
+#include "opregion.h"
 
-enum cb_err init_igd_opregion(igd_opregion_t *opregion);
+enum cb_err intel_gma_init_igd_opregion(igd_opregion_t *opregion);
 
-#endif /* NORTHBRIDGE_INTEL_COMMON_GMA_OPREGION_H_ */
+#endif /* INTEL_GMA_OPREGION_H_ */
diff --git a/src/northbridge/intel/common/Kconfig b/src/northbridge/intel/common/Kconfig
index 672010e..80593d6 100644
--- a/src/northbridge/intel/common/Kconfig
+++ b/src/northbridge/intel/common/Kconfig
@@ -1,5 +1,2 @@
 config NORTHBRIDGE_INTEL_COMMON_MRC_CACHE
 	def_bool n
-
-config NORTHBRIDGE_INTEL_COMMON_GMA_OPREGION
-	def_bool n
diff --git a/src/northbridge/intel/common/Makefile.inc b/src/northbridge/intel/common/Makefile.inc
index fe72970..73427cb 100644
--- a/src/northbridge/intel/common/Makefile.inc
+++ b/src/northbridge/intel/common/Makefile.inc
@@ -15,4 +15,3 @@
 
 romstage-$(CONFIG_NORTHBRIDGE_INTEL_COMMON_MRC_CACHE) += mrc_cache.c
 ramstage-$(CONFIG_NORTHBRIDGE_INTEL_COMMON_MRC_CACHE) += mrc_cache.c
-ramstage-$(CONFIG_NORTHBRIDGE_INTEL_COMMON_GMA_OPREGION) += gma_opregion.c
diff --git a/src/northbridge/intel/fsp_sandybridge/Kconfig b/src/northbridge/intel/fsp_sandybridge/Kconfig
index 5446ba3..2b73a1b 100644
--- a/src/northbridge/intel/fsp_sandybridge/Kconfig
+++ b/src/northbridge/intel/fsp_sandybridge/Kconfig
@@ -18,13 +18,13 @@
 	bool
 	select CPU_INTEL_FSP_MODEL_206AX
 	select INTEL_GMA_ACPI
-	select NORTHBRIDGE_INTEL_COMMON_GMA_OPREGION
+	select INTEL_GMA_OPREGION
 
 config NORTHBRIDGE_INTEL_FSP_IVYBRIDGE
 	bool
 	select CPU_INTEL_FSP_MODEL_306AX
 	select INTEL_GMA_ACPI
-	select NORTHBRIDGE_INTEL_COMMON_GMA_OPREGION
+	select INTEL_GMA_OPREGION
 
 if NORTHBRIDGE_INTEL_FSP_IVYBRIDGE || NORTHBRIDGE_INTEL_FSP_SANDYBRIDGE
 
diff --git a/src/northbridge/intel/fsp_sandybridge/gma.c b/src/northbridge/intel/fsp_sandybridge/gma.c
index a3dbb1c..cf771fb 100644
--- a/src/northbridge/intel/fsp_sandybridge/gma.c
+++ b/src/northbridge/intel/fsp_sandybridge/gma.c
@@ -20,7 +20,7 @@
 #include <device/pci.h>
 #include <device/pci_ids.h>
 #include <southbridge/intel/fsp_bd82x6x/nvs.h>
-#include <northbridge/intel/common/gma_opregion.h>
+#include <drivers/intel/gma/gma_opregion.h>
 #include <drivers/intel/gma/intel_bios.h>
 
 #include <cbmem.h>
@@ -133,7 +133,7 @@
 	igd_opregion_t *opregion = (igd_opregion_t *)current;
 	global_nvs_t *gnvs;
 
-	if (init_igd_opregion(opregion) != CB_SUCCESS)
+	if (intel_gma_init_igd_opregion(opregion) != CB_SUCCESS)
 		return current;
 
 	current += sizeof(igd_opregion_t);
diff --git a/src/northbridge/intel/haswell/Kconfig b/src/northbridge/intel/haswell/Kconfig
index 90f8774..d6cf0d7 100644
--- a/src/northbridge/intel/haswell/Kconfig
+++ b/src/northbridge/intel/haswell/Kconfig
@@ -17,7 +17,7 @@
 	bool
 	select CPU_INTEL_HASWELL
 	select NORTHBRIDGE_INTEL_COMMON_MRC_CACHE
-	select NORTHBRIDGE_INTEL_COMMON_GMA_OPREGION
+	select INTEL_GMA_OPREGION
 	select INTEL_DDI
 	select INTEL_GMA_ACPI
 	select RELOCATABLE_RAMSTAGE
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index 4baea70..67d328e 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -24,7 +24,7 @@
 #include <drivers/intel/gma/i915_reg.h>
 #include <drivers/intel/gma/i915.h>
 #include <cpu/intel/haswell/haswell.h>
-#include <northbridge/intel/common/gma_opregion.h>
+#include <drivers/intel/gma/gma_opregion.h>
 #include <southbridge/intel/lynxpoint/nvs.h>
 #include <stdlib.h>
 #include <string.h>
@@ -534,7 +534,7 @@
 	igd_opregion_t *opregion = (igd_opregion_t *)current;
 	global_nvs_t *gnvs;
 
-	if (init_igd_opregion(opregion) != CB_SUCCESS)
+	if (intel_gma_init_igd_opregion(opregion) != CB_SUCCESS)
 		return current;
 
 	current += sizeof(igd_opregion_t);
diff --git a/src/northbridge/intel/nehalem/Kconfig b/src/northbridge/intel/nehalem/Kconfig
index 0cfa750..ec9dfed 100644
--- a/src/northbridge/intel/nehalem/Kconfig
+++ b/src/northbridge/intel/nehalem/Kconfig
@@ -21,7 +21,7 @@
 	select TSC_MONOTONIC_TIMER
 	select INTEL_GMA_ACPI
 	select NORTHBRIDGE_INTEL_COMMON_MRC_CACHE
-	select NORTHBRIDGE_INTEL_COMMON_GMA_OPREGION
+	select INTEL_GMA_OPREGION
 	select ACPI_HUGE_LOWMEM_BACKUP
 	select HAVE_LINEAR_FRAMEBUFFER if MAINBOARD_DO_NATIVE_VGA_INIT
 	select HAVE_VGA_TEXT_FRAMEBUFFER if MAINBOARD_DO_NATIVE_VGA_INIT
diff --git a/src/northbridge/intel/nehalem/gma.c b/src/northbridge/intel/nehalem/gma.c
index 0607f34..4058b7a 100644
--- a/src/northbridge/intel/nehalem/gma.c
+++ b/src/northbridge/intel/nehalem/gma.c
@@ -30,7 +30,7 @@
 #include <pc80/vga.h>
 #include <pc80/vga_io.h>
 #include <southbridge/intel/ibexpeak/nvs.h>
-#include <northbridge/intel/common/gma_opregion.h>
+#include <drivers/intel/gma/gma_opregion.h>
 #include <cbmem.h>
 
 #include "chip.h"
@@ -1143,7 +1143,7 @@
 	igd_opregion_t *opregion = (igd_opregion_t *)current;
 	global_nvs_t *gnvs;
 
-	if (init_igd_opregion(opregion) != CB_SUCCESS)
+	if (intel_gma_init_igd_opregion(opregion) != CB_SUCCESS)
 		return current;
 
 	current += sizeof(igd_opregion_t);
diff --git a/src/northbridge/intel/sandybridge/Kconfig b/src/northbridge/intel/sandybridge/Kconfig
index ae5ddfc..3c86303 100644
--- a/src/northbridge/intel/sandybridge/Kconfig
+++ b/src/northbridge/intel/sandybridge/Kconfig
@@ -17,7 +17,7 @@
 config NORTHBRIDGE_INTEL_SANDYBRIDGE
 	bool
 	select NORTHBRIDGE_INTEL_COMMON_MRC_CACHE
-	select NORTHBRIDGE_INTEL_COMMON_GMA_OPREGION
+	select INTEL_GMA_OPREGION
 	select CPU_INTEL_MODEL_206AX
 	select HAVE_DEBUG_RAM_SETUP
 	select INTEL_GMA_ACPI
@@ -26,7 +26,7 @@
 config NORTHBRIDGE_INTEL_IVYBRIDGE
 	bool
 	select NORTHBRIDGE_INTEL_COMMON_MRC_CACHE
-	select NORTHBRIDGE_INTEL_COMMON_GMA_OPREGION
+	select INTEL_GMA_OPREGION
 	select CPU_INTEL_MODEL_306AX
 	select HAVE_DEBUG_RAM_SETUP
 	select INTEL_GMA_ACPI
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c
index 6d1044c..5b276c7 100644
--- a/src/northbridge/intel/sandybridge/gma.c
+++ b/src/northbridge/intel/sandybridge/gma.c
@@ -25,7 +25,7 @@
 #include <cpu/x86/msr.h>
 #include <cpu/x86/mtrr.h>
 #include <southbridge/intel/bd82x6x/nvs.h>
-#include <northbridge/intel/common/gma_opregion.h>
+#include <drivers/intel/gma/gma_opregion.h>
 #include <cbmem.h>
 
 #include "chip.h"
@@ -696,7 +696,7 @@
 	igd_opregion_t *opregion = (igd_opregion_t *)current;
 	global_nvs_t *gnvs;
 
-	if (init_igd_opregion(opregion) != CB_SUCCESS)
+	if (intel_gma_init_igd_opregion(opregion) != CB_SUCCESS)
 		return current;
 
 	current += sizeof(igd_opregion_t);

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d0bae98f04dbe7e896ca34e15f24d29b6aa2ed6
Gerrit-Change-Number: 20582
Gerrit-PatchSet: 1
Gerrit-Owner: Matt DeVillier <matt.devillier at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170714/fce51619/attachment.html>


More information about the coreboot-gerrit mailing list