* [PATCH igt 1/3] tools: Allow iosf-sb utils to work on chv
@ 2014-09-12 14:30 ville.syrjala
2014-09-12 14:30 ` [PATCH igt 2/3] toos/intel_iosf_sb: Add symbolic unit names ville.syrjala
2014-09-12 14:30 ` [PATCH igt 3/3] tools: Remove punit and nc reg read/write tools ville.syrjala
0 siblings, 2 replies; 5+ messages in thread
From: ville.syrjala @ 2014-09-12 14:30 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
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@linux.intel.com>
---
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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH igt 2/3] toos/intel_iosf_sb: Add symbolic unit names
2014-09-12 14:30 [PATCH igt 1/3] tools: Allow iosf-sb utils to work on chv ville.syrjala
@ 2014-09-12 14:30 ` ville.syrjala
2014-09-12 14:30 ` [PATCH igt 3/3] tools: Remove punit and nc reg read/write tools ville.syrjala
1 sibling, 0 replies; 5+ messages in thread
From: ville.syrjala @ 2014-09-12 14:30 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Add a bunc of symbolic sideband unit names so that you don't have to go
trawling through the sideband HAS every time you want to poke at
something with the tool. You can still specify the port manually though
if you know them by heart already.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tools/intel_iosf_sb_read.c | 24 ++++++++++++++++++++++--
tools/intel_iosf_sb_write.c | 26 +++++++++++++++++++++++---
2 files changed, 45 insertions(+), 5 deletions(-)
diff --git a/tools/intel_iosf_sb_read.c b/tools/intel_iosf_sb_read.c
index f7ff64a..8f35e50 100644
--- a/tools/intel_iosf_sb_read.c
+++ b/tools/intel_iosf_sb_read.c
@@ -48,13 +48,33 @@ int main(int argc, char *argv[])
return 1;
}
- port = strtoul(argv[1], NULL, 16);
+ if (!strcasecmp(argv[1], "bunit"))
+ port = 0x03;
+ else if (!strcasecmp(argv[1], "punit"))
+ port = 0x04;
+ else if (!strcasecmp(argv[1], "nc"))
+ port = 0x11;
+ else if (!strcasecmp(argv[1], "dpio"))
+ port = 0x13;
+ else if (!strcasecmp(argv[1], "gpio_nc"))
+ port = 0x13;
+ else if (!strcasecmp(argv[1], "cck"))
+ port = 0x14;
+ else if (!strcasecmp(argv[1], "ccu"))
+ port = 0xa9;
+ else if (!strcasecmp(argv[1], "dpio2"))
+ port = 0x1a;
+ else if (!strcasecmp(argv[1], "flisdsi"))
+ port = 0x1b;
+ else
+ port = strtoul(argv[1], NULL, 16);
+
reg = strtoul(argv[2], NULL, 16);
intel_register_access_init(dev, 0);
val = intel_iosf_sb_read(port, reg);
- printf("0x%02x/0x%04x : 0x%08x\n", port, reg, val);
+ printf("0x%02x(%s)/0x%04x : 0x%08x\n", port, argv[1], reg, val);
intel_register_access_fini();
diff --git a/tools/intel_iosf_sb_write.c b/tools/intel_iosf_sb_write.c
index 251b660..8d06380 100644
--- a/tools/intel_iosf_sb_write.c
+++ b/tools/intel_iosf_sb_write.c
@@ -47,19 +47,39 @@ int main(int argc, char** argv)
return 1;
}
- port = strtoul(argv[1], NULL, 16);
+ if (!strcasecmp(argv[1], "bunit"))
+ port = 0x03;
+ else if (!strcasecmp(argv[1], "punit"))
+ port = 0x04;
+ else if (!strcasecmp(argv[1], "nc"))
+ port = 0x11;
+ else if (!strcasecmp(argv[1], "dpio"))
+ port = 0x13;
+ else if (!strcasecmp(argv[1], "gpio_nc"))
+ port = 0x13;
+ else if (!strcasecmp(argv[1], "cck"))
+ port = 0x14;
+ else if (!strcasecmp(argv[1], "ccu"))
+ port = 0xa9;
+ else if (!strcasecmp(argv[1], "dpio2"))
+ port = 0x1a;
+ else if (!strcasecmp(argv[1], "flisdsi"))
+ port = 0x1b;
+ else
+ port = strtoul(argv[1], NULL, 16);
+
reg = strtoul(argv[2], NULL, 16);
val = strtoul(argv[3], NULL, 16);
intel_register_access_init(dev, 0);
tmp = intel_iosf_sb_read(port, reg);
- printf("Value before: 0x%X\n", tmp);
+ printf("0x%02x(%s)/0x%04x before : 0x%08x\n", port, argv[1], reg, tmp);
intel_iosf_sb_write(port, reg, val);
tmp = intel_iosf_sb_read(port, reg);
- printf("Value after: 0x%X\n", tmp);
+ printf("0x%02x(%s)/0x%04x after : 0x%08x\n", port, argv[1], reg, tmp);
intel_register_access_fini();
--
1.8.5.5
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH igt 3/3] tools: Remove punit and nc reg read/write tools
2014-09-12 14:30 [PATCH igt 1/3] tools: Allow iosf-sb utils to work on chv ville.syrjala
2014-09-12 14:30 ` [PATCH igt 2/3] toos/intel_iosf_sb: Add symbolic unit names ville.syrjala
@ 2014-09-12 14:30 ` ville.syrjala
2014-09-12 14:55 ` Jani Nikula
1 sibling, 1 reply; 5+ messages in thread
From: ville.syrjala @ 2014-09-12 14:30 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
intel_iosf_sb_{read,write} provide the same functionality.
intel_dpio_{read,write} are still left in place since they use a
different opcode to do the register access. Need to verify if
both opcodes work.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tools/Makefile.sources | 4 ---
tools/intel_nc_read.c | 71 -------------------------------------------
tools/intel_nc_write.c | 76 -----------------------------------------------
tools/intel_punit_read.c | 71 -------------------------------------------
tools/intel_punit_write.c | 76 -----------------------------------------------
5 files changed, 298 deletions(-)
delete mode 100644 tools/intel_nc_read.c
delete mode 100644 tools/intel_nc_write.c
delete mode 100644 tools/intel_punit_read.c
delete mode 100644 tools/intel_punit_write.c
diff --git a/tools/Makefile.sources b/tools/Makefile.sources
index aa2df93..6a73fa0 100644
--- a/tools/Makefile.sources
+++ b/tools/Makefile.sources
@@ -23,10 +23,6 @@ bin_PROGRAMS = \
intel_dpio_read \
intel_dpio_write \
intel_l3_parity \
- intel_punit_read \
- intel_punit_write \
- intel_nc_write \
- intel_nc_read \
intel_vga_read \
intel_vga_write \
intel_dump_decode \
diff --git a/tools/intel_nc_read.c b/tools/intel_nc_read.c
deleted file mode 100644
index 721274f..0000000
--- a/tools/intel_nc_read.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright © 2012 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Vijay Purushothaman <vijay.a.purushothaman@intel.com>
- *
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <err.h>
-#include <string.h>
-#include "intel_io.h"
-#include "intel_chipset.h"
-
-static void usage(char *cmdname)
-{
- printf("Warning : This program will work only on Valleyview\n");
- printf("Usage: %s [addr]\n", cmdname);
- printf("\t addr : in 0xXXXX format\n");
-}
-
-int main(int argc, char** argv)
-{
- int ret = 0;
- uint32_t reg, val;
- char *cmdname = strdup(argv[0]);
- struct pci_device *dev = intel_get_pci_device();
-
- if (argc != 2 || !(IS_VALLEYVIEW(dev->device_id) || IS_CHERRYVIEW(dev->device_id))) {
- usage(cmdname);
- ret = 1;
- goto out;
- }
-
- sscanf(argv[1], "0x%x", ®);
-
- intel_register_access_init(dev, 0);
-
- ret = intel_nc_read(reg, &val);
- if (ret)
- fprintf(stderr, "iosf read failed: %d\n", ret);
-
- printf("Read IOSF register: 0x%x - Value : 0x%x\n", reg, val);
-
- intel_register_access_fini();
-
-out:
- free(cmdname);
- return ret;
-}
diff --git a/tools/intel_nc_write.c b/tools/intel_nc_write.c
deleted file mode 100644
index 9015ec1..0000000
--- a/tools/intel_nc_write.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright © 2012 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Vijay Purushothaman <vijay.a.purushothaman@intel.com>
- *
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <err.h>
-#include <string.h>
-#include "intel_io.h"
-#include "intel_chipset.h"
-
-static void usage(char *cmdname)
-{
- printf("Warning : This program will work only on Valleyview\n");
- printf("Usage: %s addr value\n", cmdname);
- printf("\t addr : in 0xXXXX format\n");
-}
-
-int main(int argc, char** argv)
-{
- int ret = 0;
- uint32_t reg, val, tmp;
- char *cmdname = strdup(argv[0]);
- struct pci_device *dev = intel_get_pci_device();
-
- if (argc != 3 || !(IS_VALLEYVIEW(dev->device_id) || IS_CHERRYVIEW(dev->device_id))) {
- usage(cmdname);
- ret = 1;
- goto out;
- }
-
- sscanf(argv[1], "0x%x", ®);
- sscanf(argv[2], "0x%x", &val);
-
- intel_register_access_init(dev, 0);
-
- intel_nc_read(reg, &tmp);
- printf("Value before: 0x%X\n", tmp);
-
- ret = intel_nc_write(reg, val);
- if (ret)
- fprintf(stderr, "Nc write failed: %d\n", ret);
-
- intel_nc_read(reg, &tmp);
- printf("Value after: 0x%X\n", tmp);
-
- intel_register_access_fini();
-
-out:
- free(cmdname);
- return ret;
-}
diff --git a/tools/intel_punit_read.c b/tools/intel_punit_read.c
deleted file mode 100644
index 5b90fab..0000000
--- a/tools/intel_punit_read.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright © 2012 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Vijay Purushothaman <vijay.a.purushothaman@intel.com>
- *
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <err.h>
-#include <string.h>
-#include "intel_io.h"
-#include "intel_chipset.h"
-
-static void usage(char *cmdname)
-{
- printf("Warning : This program will work only on Valleyview\n");
- printf("Usage: %s [addr]\n", cmdname);
- printf("\t addr : in 0xXXXX format\n");
-}
-
-int main(int argc, char** argv)
-{
- int ret = 0;
- uint32_t reg, val;
- char *cmdname = strdup(argv[0]);
- struct pci_device *dev = intel_get_pci_device();
-
- if (argc != 2 || !(IS_VALLEYVIEW(dev->device_id) || IS_CHERRYVIEW(dev->device_id))) {
- usage(cmdname);
- ret = 1;
- goto out;
- }
-
- sscanf(argv[1], "0x%x", ®);
-
- intel_register_access_init(dev, 0);
-
- ret = intel_punit_read(reg, &val);
- if (ret)
- fprintf(stderr, "iosf read failed: %d\n", ret);
-
- printf("Read IOSF register: 0x%x - Value : 0x%x\n", reg, val);
-
- intel_register_access_fini();
-
-out:
- free(cmdname);
- return ret;
-}
diff --git a/tools/intel_punit_write.c b/tools/intel_punit_write.c
deleted file mode 100644
index ca99161..0000000
--- a/tools/intel_punit_write.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright © 2012 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- * Vijay Purushothaman <vijay.a.purushothaman@intel.com>
- *
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <err.h>
-#include <string.h>
-#include "intel_io.h"
-#include "intel_chipset.h"
-
-static void usage(char *cmdname)
-{
- printf("Warning : This program will work only on Valleyview\n");
- printf("Usage: %s addr value\n", cmdname);
- printf("\t addr : in 0xXXXX format\n");
-}
-
-int main(int argc, char** argv)
-{
- int ret = 0;
- uint32_t reg, val, tmp;
- char *cmdname = strdup(argv[0]);
- struct pci_device *dev = intel_get_pci_device();
-
- if (argc != 3 || !(IS_VALLEYVIEW(dev->device_id) || IS_CHERRYVIEW(dev->device_id))) {
- usage(cmdname);
- ret = 1;
- goto out;
- }
-
- sscanf(argv[1], "0x%x", ®);
- sscanf(argv[2], "0x%x", &val);
-
- intel_register_access_init(dev, 0);
-
- intel_punit_read(reg, &tmp);
- printf("Value before: 0x%X\n", tmp);
-
- ret = intel_punit_write(reg, val);
- if (ret)
- fprintf(stderr, "Punit write failed: %d\n", ret);
-
- intel_punit_read(reg, &tmp);
- printf("Value after: 0x%X\n", tmp);
-
- intel_register_access_fini();
-
-out:
- free(cmdname);
- return ret;
-}
--
1.8.5.5
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH igt 3/3] tools: Remove punit and nc reg read/write tools
2014-09-12 14:30 ` [PATCH igt 3/3] tools: Remove punit and nc reg read/write tools ville.syrjala
@ 2014-09-12 14:55 ` Jani Nikula
2014-09-12 15:02 ` Ville Syrjälä
0 siblings, 1 reply; 5+ messages in thread
From: Jani Nikula @ 2014-09-12 14:55 UTC (permalink / raw)
To: ville.syrjala, intel-gfx
On Fri, 12 Sep 2014, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> intel_iosf_sb_{read,write} provide the same functionality.
>
> intel_dpio_{read,write} are still left in place since they use a
> different opcode to do the register access. Need to verify if
> both opcodes work.
And if they don't, can you add a param or special case for that in the
iosf sb tool?
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH igt 3/3] tools: Remove punit and nc reg read/write tools
2014-09-12 14:55 ` Jani Nikula
@ 2014-09-12 15:02 ` Ville Syrjälä
0 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2014-09-12 15:02 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Fri, Sep 12, 2014 at 05:55:40PM +0300, Jani Nikula wrote:
> On Fri, 12 Sep 2014, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > intel_iosf_sb_{read,write} provide the same functionality.
> >
> > intel_dpio_{read,write} are still left in place since they use a
> > different opcode to do the register access. Need to verify if
> > both opcodes work.
>
> And if they don't, can you add a param or special case for that in the
> iosf sb tool?
Yeah that can be done if needed.
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-12 15:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-12 14:30 [PATCH igt 1/3] tools: Allow iosf-sb utils to work on chv ville.syrjala
2014-09-12 14:30 ` [PATCH igt 2/3] toos/intel_iosf_sb: Add symbolic unit names ville.syrjala
2014-09-12 14:30 ` [PATCH igt 3/3] tools: Remove punit and nc reg read/write tools ville.syrjala
2014-09-12 14:55 ` Jani Nikula
2014-09-12 15:02 ` Ville Syrjälä
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox