From b39eb28c256ecdf4f60dab08dba4bbc36294a576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Thu, 28 Aug 2014 16:32:46 +0300 Subject: [PATCH] tools: Allow iosf-sb utils to work on chv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ä --- 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 09f03764..20561d2d 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 15c79efe..45cc95ff 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 216defea..f7ff64a2 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 0d3dea20..251b6607 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 d6d09a81..721274f2 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 d7656884..9015ec1f 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 b0a2697a..5b90fabd 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 9ffe018d..ca991616 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;