[Intel-gfx] [PATCH 20/28] lib/intel_io: rename mmio setup functions

Daniel Vetter daniel.vetter at ffwll.ch
Sun Mar 23 15:18:54 CET 2014


Makes their intent a bit clearer.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 lib/intel_io.h             | 4 ++--
 lib/intel_mmio.c           | 6 +++---
 tools/intel_audio_dump.c   | 4 ++--
 tools/intel_backlight.c    | 2 +-
 tools/intel_gpu_time.c     | 2 +-
 tools/intel_gpu_top.c      | 2 +-
 tools/intel_lid.c          | 2 +-
 tools/intel_reg_checker.c  | 2 +-
 tools/intel_reg_dumper.c   | 2 +-
 tools/intel_reg_snapshot.c | 2 +-
 10 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/lib/intel_io.h b/lib/intel_io.h
index 591fd3f446c3..5ea50cab472c 100644
--- a/lib/intel_io.h
+++ b/lib/intel_io.h
@@ -33,8 +33,8 @@
 
 /* register access helpers from intel_mmio.c */
 extern void *mmio;
-void intel_get_mmio(struct pci_device *pci_dev);
-void intel_map_file(char *);
+void intel_mmio_use_pci_bar(struct pci_device *pci_dev);
+void intel_mmio_use_dump_file(char *);
 
 int intel_register_access_init(struct pci_device *pci_dev, int safe);
 void intel_register_access_fini(void);
diff --git a/lib/intel_mmio.c b/lib/intel_mmio.c
index 444e44507eac..97eee5601f91 100644
--- a/lib/intel_mmio.c
+++ b/lib/intel_mmio.c
@@ -58,7 +58,7 @@ static struct _mmio_data {
 } mmio_data;
 
 void
-intel_map_file(char *file)
+intel_mmio_use_dump_file(char *file)
 {
 	int fd;
 	struct stat st;
@@ -80,7 +80,7 @@ intel_map_file(char *file)
 }
 
 void
-intel_get_mmio(struct pci_device *pci_dev)
+intel_mmio_use_pci_bar(struct pci_device *pci_dev)
 {
 	uint32_t devid, gen;
 	int mmio_bar, mmio_size;
@@ -132,7 +132,7 @@ intel_register_access_init(struct pci_device *pci_dev, int safe)
 
 	/* after old API is deprecated, remove this */
 	if (mmio == NULL)
-		intel_get_mmio(pci_dev);
+		intel_mmio_use_pci_bar(pci_dev);
 
 	assert(mmio != NULL);
 
diff --git a/tools/intel_audio_dump.c b/tools/intel_audio_dump.c
index 26023743307b..f3bb9ebdfd02 100644
--- a/tools/intel_audio_dump.c
+++ b/tools/intel_audio_dump.c
@@ -2277,9 +2277,9 @@ int main(int argc, char **argv)
 	do_self_tests();
 
 	if (argc == 2)
-		intel_map_file(argv[1]);
+		intel_mmio_use_dump_file(argv[1]);
 	else
-		intel_get_mmio(pci_dev);
+		intel_mmio_use_pci_bar(pci_dev);
 
 	if (IS_VALLEYVIEW(devid)) {
 		printf("Valleyview audio registers:\n\n");
diff --git a/tools/intel_backlight.c b/tools/intel_backlight.c
index b866ec8efaee..17deb88d4be8 100644
--- a/tools/intel_backlight.c
+++ b/tools/intel_backlight.c
@@ -50,7 +50,7 @@ int main(int argc, char** argv)
 {
 	uint32_t current, max;
 
-	intel_get_mmio(intel_get_pci_device());
+	intel_mmio_use_pci_bar(intel_get_pci_device());
 
 	current = reg_read(BLC_PWM_CPU_CTL) & BACKLIGHT_DUTY_CYCLE_MASK;
 	max = reg_read(BLC_PWM_PCH_CTL2) >> 16;
diff --git a/tools/intel_gpu_time.c b/tools/intel_gpu_time.c
index 4096f1c5486f..56d65fe07967 100644
--- a/tools/intel_gpu_time.c
+++ b/tools/intel_gpu_time.c
@@ -67,7 +67,7 @@ int main(int argc, char **argv)
 	static struct rusage rusage;
 	int status;
 
-	intel_get_mmio(intel_get_pci_device());
+	intel_mmio_use_pci_bar(intel_get_pci_device());
 
 	if (argc == 1) {
 		fprintf(stderr, "usage: %s cmd [args...]\n", argv[0]);
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index a016bc9bdecc..b5cfda043dd9 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -473,7 +473,7 @@ int main(int argc, char **argv)
 
 	pci_dev = intel_get_pci_device();
 	devid = pci_dev->device_id;
-	intel_get_mmio(pci_dev);
+	intel_mmio_use_pci_bar(pci_dev);
 	init_instdone_definitions(devid);
 
 	/* Do we have a command to run? */
diff --git a/tools/intel_lid.c b/tools/intel_lid.c
index 7bcb63a772fd..0703e2e1e14e 100644
--- a/tools/intel_lid.c
+++ b/tools/intel_lid.c
@@ -118,7 +118,7 @@ int main(int argc, char **argv)
 {
 	int swf14, acpi_lid;
 
-	intel_get_mmio(intel_get_pci_device());
+	intel_mmio_use_pci_bar(intel_get_pci_device());
 
 	while (1) {
 		swf14 = INREG(SWF14);
diff --git a/tools/intel_reg_checker.c b/tools/intel_reg_checker.c
index 92b06fa152d4..22d979613ea1 100644
--- a/tools/intel_reg_checker.c
+++ b/tools/intel_reg_checker.c
@@ -350,7 +350,7 @@ int main(int argc, char** argv)
 
 	dev = intel_get_pci_device();
 	devid = dev->device_id;
-	intel_get_mmio(dev);
+	intel_mmio_use_pci_bar(dev);
 
 	if (IS_GEN7(devid))
 		gen = 7;
diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
index 04fd6b2d8b8c..4d3d2c7f0f17 100644
--- a/tools/intel_reg_dumper.c
+++ b/tools/intel_reg_dumper.c
@@ -2931,7 +2931,7 @@ int main(int argc, char** argv)
 	}
 
 	if (file) {
-		intel_map_file(file);
+		intel_mmio_use_dump_file(file);
 		if (devid) {
 			if (IS_GEN5(devid))
 				intel_pch = PCH_IBX;
diff --git a/tools/intel_reg_snapshot.c b/tools/intel_reg_snapshot.c
index 166b68e25271..b756bf690217 100644
--- a/tools/intel_reg_snapshot.c
+++ b/tools/intel_reg_snapshot.c
@@ -38,7 +38,7 @@ int main(int argc, char** argv)
 
 	pci_dev = intel_get_pci_device();
 	devid = pci_dev->device_id;
-	intel_get_mmio(pci_dev);
+	intel_mmio_use_pci_bar(pci_dev);
 
 	if (IS_GEN2(devid))
 		mmio_bar = 1;
-- 
1.8.5.2




More information about the Intel-gfx mailing list