tools: Allow iosf-sb utils to work on chv
PATCH 1/3 tools: Allow iosf-sb utils to work on chv
From: Ville Syrjälä <[email protected]>
Unlike the kernel IS_VALLEYVIEW() doesn't cover chv in igt. Add the appropriate IS_CHERRYVIEW() checks to the various sideband poking tools.
--- 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(-)
tools/intel_dpio_read.c +1 -1
@@ -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;
tools/intel_dpio_write.c +1 -1
@@ -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;
tools/intel_iosf_sb_read.c +1 -1
@@ -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 ; }
tools/intel_iosf_sb_write.c +1 -1
@@ -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 ; }
tools/intel_nc_read.c +1 -1
@@ -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;
tools/intel_nc_write.c +1 -1
@@ -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;
tools/intel_punit_read.c +1 -1
@@ -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;
tools/intel_punit_write.c +1 -1
@@ -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;
Signature · 6 lines
1.8.5.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 toos/intel_iosf_sb: Add symbolic unit names
From: Ville Syrjälä <[email protected]>
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.
--- tools/intel_iosf_sb_read.c | 24 ++++++++++++++++++++++-- tools/intel_iosf_sb_write.c | 26 +++++++++++++++++++++++--- 2 files changed, 45 insertions(+), 5 deletions(-)
tools/intel_iosf_sb_read.c +22 -2
@@ -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 ();
tools/intel_iosf_sb_write.c +23 -3
@@ -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 ();
Signature · 6 lines
1.8.5.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 tools: Remove punit and nc reg read/write tools
In reply to [email protected]From: Ville Syrjälä <[email protected]>
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.
--- 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
tools/Makefile.sources +0 -4
@@ -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 \
tools/intel_nc_read.c deleted +0 -71
71 lines not on this page · raw message
tools/intel_nc_write.c deleted +0 -76
76 lines not on this page · raw message
tools/intel_punit_read.c deleted +0 -71
71 lines not on this page · raw message
tools/intel_punit_write.c deleted +0 -76
76 lines not on this page · raw message
Signature · 6 lines
1.8.5.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH igt 3/3] tools: Remove punit and nc reg read/write tools
Quoted 7 lines · On Fri, 12 Sep 2014, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
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.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH igt 3/3] tools: Remove punit and nc reg read/write tools
Quoted 11 lines · Jani Nikula
Quoted 7 lines · On Fri, 12 Sep 2014, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
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.
Signature · 2 lines
Ville Syrjälä Intel OTC