[PATCH igt 1/3] tools: Allow iosf-sb utils to work on chv

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Unlike the kernel IS_VALLEYVIEW() doesn't cover chv in igt. Add the
appropriate IS_CHERRYVIEW() checks to the various sideband poking tools.

Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
---
 tools/intel_dpio_read.c     | 2 +-
 tools/intel_dpio_write.c    | 2 +-
 tools/intel_iosf_sb_read.c  | 2 +-
 tools/intel_iosf_sb_write.c | 2 +-
 tools/intel_nc_read.c       | 2 +-
 tools/intel_nc_write.c      | 2 +-
 tools/intel_punit_read.c    | 2 +-
 tools/intel_punit_write.c   | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tools/intel_dpio_read.c b/tools/intel_dpio_read.c
index 09f0376..20561d2 100644
--- a/tools/intel_dpio_read.c
+++ b/tools/intel_dpio_read.c
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
 	char *cmdname = strdup(argv[0]);
 	struct pci_device *dev = intel_get_pci_device();
 
-	if (argc != 2 || !IS_VALLEYVIEW(dev->device_id)) {
+	if (argc != 2 || !(IS_VALLEYVIEW(dev->device_id) || IS_CHERRYVIEW(dev->device_id))) {
 		usage(cmdname);
 		ret = 1;
 		goto out;
diff --git a/tools/intel_dpio_write.c b/tools/intel_dpio_write.c
index 15c79ef..45cc95f 100644
--- a/tools/intel_dpio_write.c
+++ b/tools/intel_dpio_write.c
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
 	char *cmdname = strdup(argv[0]);
 	struct pci_device *dev = intel_get_pci_device();
 
-	if (argc != 3 || !IS_VALLEYVIEW(dev->device_id)) {
+	if (argc != 3 || !(IS_VALLEYVIEW(dev->device_id) || IS_CHERRYVIEW(dev->device_id))) {
 		usage(cmdname);
 		ret = 1;
 		goto out;
diff --git a/tools/intel_iosf_sb_read.c b/tools/intel_iosf_sb_read.c
index 216defe..f7ff64a 100644
--- a/tools/intel_iosf_sb_read.c
+++ b/tools/intel_iosf_sb_read.c
@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
 	uint32_t port, reg, val;
 	struct pci_device *dev = intel_get_pci_device();
 
-	if (argc != 3 || !IS_VALLEYVIEW(dev->device_id)) {
+	if (argc != 3 || !(IS_VALLEYVIEW(dev->device_id) || IS_CHERRYVIEW(dev->device_id))) {
 		usage(argv[0]);
 		return 1;
 	}
diff --git a/tools/intel_iosf_sb_write.c b/tools/intel_iosf_sb_write.c
index 0d3dea2..251b660 100644
--- a/tools/intel_iosf_sb_write.c
+++ b/tools/intel_iosf_sb_write.c
@@ -42,7 +42,7 @@ int main(int argc, char** argv)
 	uint32_t port, reg, val, tmp;
 	struct pci_device *dev = intel_get_pci_device();
 
-	if (argc != 4 || !IS_VALLEYVIEW(dev->device_id)) {
+	if (argc != 4 || !(IS_VALLEYVIEW(dev->device_id) || IS_CHERRYVIEW(dev->device_id))) {
 		usage(argv[0]);
 		return 1;
 	}
diff --git a/tools/intel_nc_read.c b/tools/intel_nc_read.c
index d6d09a8..721274f 100644
--- a/tools/intel_nc_read.c
+++ b/tools/intel_nc_read.c
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
 	char *cmdname = strdup(argv[0]);
 	struct pci_device *dev = intel_get_pci_device();
 
-	if (argc != 2 || !IS_VALLEYVIEW(dev->device_id)) {
+	if (argc != 2 || !(IS_VALLEYVIEW(dev->device_id) || IS_CHERRYVIEW(dev->device_id))) {
 		usage(cmdname);
 		ret = 1;
 		goto out;
diff --git a/tools/intel_nc_write.c b/tools/intel_nc_write.c
index d765688..9015ec1 100644
--- a/tools/intel_nc_write.c
+++ b/tools/intel_nc_write.c
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
 	char *cmdname = strdup(argv[0]);
 	struct pci_device *dev = intel_get_pci_device();
 
-	if (argc != 3 || !IS_VALLEYVIEW(dev->device_id)) {
+	if (argc != 3 || !(IS_VALLEYVIEW(dev->device_id) || IS_CHERRYVIEW(dev->device_id))) {
 		usage(cmdname);
 		ret = 1;
 		goto out;
diff --git a/tools/intel_punit_read.c b/tools/intel_punit_read.c
index b0a2697..5b90fab 100644
--- a/tools/intel_punit_read.c
+++ b/tools/intel_punit_read.c
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
 	char *cmdname = strdup(argv[0]);
 	struct pci_device *dev = intel_get_pci_device();
 
-	if (argc != 2 || !IS_VALLEYVIEW(dev->device_id)) {
+	if (argc != 2 || !(IS_VALLEYVIEW(dev->device_id) || IS_CHERRYVIEW(dev->device_id))) {
 		usage(cmdname);
 		ret = 1;
 		goto out;
diff --git a/tools/intel_punit_write.c b/tools/intel_punit_write.c
index 9ffe018..ca99161 100644
--- a/tools/intel_punit_write.c
+++ b/tools/intel_punit_write.c
@@ -47,7 +47,7 @@ int main(int argc, char** argv)
 	char *cmdname = strdup(argv[0]);
 	struct pci_device *dev = intel_get_pci_device();
 
-	if (argc != 3 || !IS_VALLEYVIEW(dev->device_id)) {
+	if (argc != 3 || !(IS_VALLEYVIEW(dev->device_id) || IS_CHERRYVIEW(dev->device_id))) {
 		usage(cmdname);
 		ret = 1;
 		goto out;
-- 
1.8.5.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux