drivers: scugic: added support for peripheral test for ZynqMP SOC
This patch modifies testapp tcl to support peripheral test for ZynqMP SOC by checking for a processor name Signed-off-by: Kinjal Pravinbhai Patel <patelki@xilinx.com>
This commit is contained in:
parent
de71767f08
commit
d240f28ea4
1 changed files with 49 additions and 39 deletions
|
@ -89,64 +89,74 @@ proc gen_testfunc_call {swproj mhsinst} {
|
|||
set decl " static XScuGic ${ipname};"
|
||||
set deviceid [::hsi::utils::get_ip_param_name $mhsinst "DEVICE_ID"]
|
||||
set stdout [common::get_property CONFIG.STDOUT [hsi::get_os]]
|
||||
if { $stdout == "" || $stdout == "none" } {
|
||||
set hasStdout 0
|
||||
} else {
|
||||
set hasStdout 1
|
||||
}
|
||||
set sw_proc_handle [hsi::get_sw_processor]
|
||||
set hw_proc_handle [hsi::get_cells [common::get_property HW_INSTANCE $sw_proc_handle] ]
|
||||
set proctype [common::get_property IP_NAME $hw_proc_handle]
|
||||
if {([string compare -nocase $proctype "ps7_cortexa9"] == 0)||
|
||||
(([string compare -nocase $proctype "psu_cortexa53"] == 0)&&([string compare -nocase $ipname "psu_acpu_gic"] == 0))||
|
||||
(([string compare -nocase $proctype "psu_cortexr5"] == 0)&&([string compare -nocase $ipname "psu_rcpu_gic"] == 0))} {
|
||||
|
||||
set intcvar intc
|
||||
if { $stdout == "" || $stdout == "none" } {
|
||||
set hasStdout 0
|
||||
} else {
|
||||
set hasStdout 1
|
||||
}
|
||||
|
||||
set testfunc_call ""
|
||||
set intcvar intc
|
||||
|
||||
if {${hasStdout} == 0} {
|
||||
set testfunc_call ""
|
||||
|
||||
append testfunc_call "
|
||||
if {${hasStdout} == 0} {
|
||||
|
||||
{
|
||||
int Status;
|
||||
append testfunc_call "
|
||||
|
||||
Status = ScuGicSelfTestExample(${deviceid});
|
||||
Status = ScuGicInterruptSetup(&${intcvar}, ${deviceid});
|
||||
{
|
||||
int Status;
|
||||
|
||||
}"
|
||||
Status = ScuGicSelfTestExample(${deviceid});
|
||||
Status = ScuGicInterruptSetup(&${intcvar}, ${deviceid});
|
||||
|
||||
}"
|
||||
|
||||
|
||||
} else {
|
||||
} else {
|
||||
|
||||
append testfunc_call "
|
||||
append testfunc_call "
|
||||
|
||||
{
|
||||
int Status;
|
||||
{
|
||||
int Status;
|
||||
|
||||
print(\"\\r\\n Running ScuGicSelfTestExample() for ${ipname}...\\r\\n\");
|
||||
print(\"\\r\\n Running ScuGicSelfTestExample() for ${ipname}...\\r\\n\");
|
||||
|
||||
Status = ScuGicSelfTestExample(${deviceid});
|
||||
Status = ScuGicSelfTestExample(${deviceid});
|
||||
|
||||
if (Status == 0) {
|
||||
print(\"ScuGicSelfTestExample PASSED\\r\\n\");
|
||||
}
|
||||
else {
|
||||
print(\"ScuGicSelfTestExample FAILED\\r\\n\");
|
||||
}
|
||||
}"
|
||||
if (Status == 0) {
|
||||
print(\"ScuGicSelfTestExample PASSED\\r\\n\");
|
||||
}
|
||||
else {
|
||||
print(\"ScuGicSelfTestExample FAILED\\r\\n\");
|
||||
}
|
||||
}"
|
||||
|
||||
append testfunc_call "
|
||||
append testfunc_call "
|
||||
|
||||
{
|
||||
int Status;
|
||||
{
|
||||
int Status;
|
||||
|
||||
Status = ScuGicInterruptSetup(&${intcvar}, ${deviceid});
|
||||
if (Status == 0) {
|
||||
print(\"ScuGic Interrupt Setup PASSED\\r\\n\");
|
||||
}
|
||||
else {
|
||||
print(\"ScuGic Interrupt Setup FAILED\\r\\n\");
|
||||
}
|
||||
}"
|
||||
Status = ScuGicInterruptSetup(&${intcvar}, ${deviceid});
|
||||
if (Status == 0) {
|
||||
print(\"ScuGic Interrupt Setup PASSED\\r\\n\");
|
||||
}
|
||||
else {
|
||||
print(\"ScuGic Interrupt Setup FAILED\\r\\n\");
|
||||
}
|
||||
}"
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
return $testfunc_call
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue