<div dir="ltr">HI 

<span style="font-size:14px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Oleksandr,</span><div><span style="font-size:14px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Sorry I used the mlnx_cpldprog in the master branch previously.</span></div><div><span style="font-size:14px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I could build it successfully after I switched to </span><span style="white-space:pre-wrap;font-size:14px">jtag_class_drv branch.</span></div><div><span style="white-space:pre-wrap;font-size:14px"><br></span></div><div><span style="white-space:pre-wrap;font-size:14px">Thanks.</span></div><div><span style="white-space:pre-wrap;font-size:14px">BRs,</span></div><div><span style="white-space:pre-wrap;font-size:14px">Henbin.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-07-20 20:38 GMT+08:00 Oleksandr Shamray <span dir="ltr"><<a href="mailto:oleksandrs@mellanox.com" target="_blank">oleksandrs@mellanox.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="RU" link="blue" vlink="purple">
<div class="m_-341526297433959713WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi </span>
Henbin<span lang="EN-US">.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://github.com/sholeksandr/mellanox-bmc-tools/tree/jtag_class_drv" target="_blank">https://github.com/<wbr>sholeksandr/mellanox-bmc-<wbr>tools/tree/jtag_class_drv</a><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">                              <wbr>        
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Today I did small changes in
</span><span lang="EN-US" style="font-size:12.0pt;background:white">mlnx_cpldprog. But why you think that it is too old?
</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Best Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Oleksandr Shamray<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Henbin Chang [mailto:<a href="mailto:henbinchang@gmail.com" target="_blank">henbinchang@gmail.com</a>]
<br>
<b>Sent:</b> 17 июля 2018 г. 13:57<br>
<b>To:</b> Oleksandr Shamray <<a href="mailto:oleksandrs@mellanox.com" target="_blank">oleksandrs@mellanox.com</a>><br>
<b>Cc:</b> OpenBMC Maillist <<a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a>></span></p><div><div class="h5"><br>
<b>Subject:</b> Re: [patch v27 0/4] JTAG driver introduction<u></u><u></u></div></div><p></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Thanks  <span style="font-size:10.5pt">Oleksandr's  response.</span><u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I just want to try the mlnx_cpldprog you mentioned.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">But the mlnx_cpldprog on the github is too old to compile with the JTAG driver (v27.)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Could you share the revised <span style="font-size:12.0pt;background:white">mlnx_cpldprog ?</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;background:white">Thanks.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">BRs,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Henbin.<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2018-07-17 17:19 GMT+08:00 Oleksandr Shamray <<a href="mailto:oleksandrs@mellanox.com" target="_blank">oleksandrs@mellanox.com</a>>:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Hi  Henbin.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">> May I know how do you verify the JTAG driver workable?</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">I have ultility which progrm CPLD with using this JTAG driver.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">You can see it on github:</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://github.com/sholeksandr/mellanox-bmc-tools/tree/jtag_class_drv/mlnx_cpldprog" target="_blank">https://github.com/<wbr>sholeksandr/mellanox-bmc-<wbr>tools/tree/jtag_class_drv/<wbr>mlnx_cpldprog</a></span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Best Regards,</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Oleksandr Shamray</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Henbin Chang [mailto:<a href="mailto:henbinchang@gmail.com" target="_blank">henbinchang@gmail.com</a>]
<br>
<b>Sent:</b> 17 июля 2018 г. 5:55<br>
<b>To:</b> OpenBMC Maillist <<a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a>>; Oleksandr Shamray <<a href="mailto:oleksandrs@mellanox.com" target="_blank">oleksandrs@mellanox.com</a>><br>
<b>Subject:</b> Re: [patch v27 0/4] JTAG driver introduction</span><u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Hi Oleksandr,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Sorry to bother you.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">May I know how do you verify the JTAG driver workable?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">BRs,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Henbin<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<p class="MsoNormal">When a need raise up to use JTAG interface for system's devices<br>
programming or CPU debugging, usually the user layer<br>
application implements jtag protocol by bit-bang or using a <br>
proprietary connection to vendor hardware.<br>
This method can be slow and not generic.<br>
<br>
We propose to implement general JTAG interface and infrastructure<br>
to communicate with user layer application. In such way, we can<br>
have the standard JTAG interface core part and separation from<br>
specific HW implementation.<br>
This allow new capability to debug the CPU or program system's <br>
device via BMC without additional devices nor cost. This patch purpose is to add JTAG master core infrastructure by
<br>
defining new JTAG class and provide generic JTAG interface<br>
to allow hardware specific drivers to connect this interface.<br>
This will enable all JTAG drivers to use the common interface<br>
part and will have separate for hardware implementation. The JTAG (Joint Test Action Group) core driver provides minimal generic<br>
JTAG interface, which can be used by hardware specific JTAG master<br>
controllers. By providing common interface for the JTAG controllers,<br>
user space device programing is hardware independent.<br>
<br>
Modern SoC which in use for embedded system' equipped with<br>
internal JTAG master interface.<br>
This interface is used for programming and debugging system's<br>
hardware components, like CPLD, FPGA, CPU, voltage and<br>
industrial controllers.<br>
Firmware for such devices can be upgraded through JTAG interface during<br>
Runtime. The JTAG standard support for multiple devices programming,<br>
is in case their lines are daisy-chained together. For example, systems which equipped with host CPU, BMC SoC or/and
<br>
number of programmable devices are capable to connect a pin and<br>
select system components dynamically for programming and debugging,<br>
This is using by the BMC which is equipped with internal SoC master<br>
controller.<br>
For example: BMC JTAG master --> pin selected to CPLDs chain for programming (filed<br>
upgrade, production) <br>
BMC JTAG master --> pin selected to voltage monitors for programming <br>
(field upgrade, production) <br>
BMC JTAG master --> pin selected to host CPU (on-site debugging <br>
and developers debugging) For example, we can have application in user space which using calls<br>
to JTAG driver executes CPLD programming directly from SVF file<br>
<br>
The JTAG standard (IEEE 1149.1) defines the next connector pins:<br>
- TDI (Test Data In);<br>
- TDO (Test Data Out);<br>
- TCK (Test Clock);<br>
- TMS (Test Mode Select);<br>
- TRST (Test Reset) (Optional); The SoC equipped with JTAG master controller, performs<br>
device programming on command or vector level. For example<br>
a file in a standard SVF (Serial Vector Format) that contains<br>
boundary scan vectors, can be used by sending each vector<br>
to the JTAG interface and the JTAG controller will execute<br>
the programming. Initial version provides the system calls set for:<br>
- SIR (Scan Instruction Register, IEEE 1149.1 Instruction Register scan);<br>
- SDR (Scan Data Register, IEEE 1149.1 Data Register scan);<br>
- RUNTEST (Forces the IEEE 1149.1 bus to a run state for a specified<br>
number of clocks. SoC which are not equipped with JTAG master interface, can be built<br>
on top of JTAG core driver infrastructure, by applying bit-banging of<br>
TDI, TDO, TCK and TMS pins within the hardware specific driver. Oleksandr Shamray (4):<br>
drivers: jtag: Add JTAG core driver<br>
drivers: jtag: Add Aspeed SoC 24xx and 25xx families JTAG master<br>
driver<br>
Documentation: jtag: Add bindings for Aspeed SoC 24xx and 25xx<br>
families JTAG master driver<br>
Documentation: jtag: Add ABI documentation Documentation/ABI/testing/<wbr>jtag-dev | 23 +<br>
.../devicetree/bindings/jtag/<wbr>aspeed-jtag.txt | 22 +<br>
Documentation/ioctl/ioctl-<wbr>number.txt | 2 +<br>
Documentation/jtag/overview | 27 +<br>
Documentation/jtag/<wbr>transactions | 109 +++<br>
MAINTAINERS | 10 +<br>
drivers/Kconfig | 2 +<br>
drivers/Makefile | 1 +<br>
drivers/jtag/Kconfig | 31 +<br>
drivers/jtag/Makefile | 2 +<br>
drivers/jtag/jtag-aspeed.c | 747 ++++++++++++++++++++<br>
drivers/jtag/jtag.c | 274 +++++++<br>
include/linux/jtag.h | 41 ++<br>
include/uapi/linux/jtag.h | 109 +++<br>
14 files changed, 1400 insertions(+), 0 deletions(-)<br>
create mode 100644 Documentation/ABI/testing/<wbr>jtag-dev<br>
create mode 100644 Documentation/devicetree/<wbr>bindings/jtag/aspeed-jtag.txt<br>
create mode 100644 Documentation/jtag/overview<br>
create mode 100644 Documentation/jtag/<wbr>transactions<br>
create mode 100644 drivers/jtag/Kconfig<br>
create mode 100644 drivers/jtag/Makefile<br>
create mode 100644 drivers/jtag/jtag-aspeed.c<br>
create mode 100644 drivers/jtag/jtag.c<br>
create mode 100644 include/linux/jtag.h<br>
create mode 100644 include/uapi/linux/jtag.h<u></u><u></u></p>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br></div>