drivers: scugic: tcl has been modified for proper error message
This patch modifies driver tcl to show proper error message when unsupported combination of IP and processor instance tries to generate BSP e.g. if psu_rcpu_gic is not supported with cortex a53 and psu_acpu_gic is not supported with cortex r5 Signed-off-by: Kinjal Pravinbhai Patel <patelki@xilinx.com> Acked-by: Anirudha Sarangi <anirudh@xilinx.com>
This commit is contained in:
parent
25a12417b1
commit
ee6224443b
1 changed files with 28 additions and 7 deletions
|
@ -74,14 +74,21 @@ proc xdefine_zynq_include_file {drv_handle file_name drv_string args} {
|
|||
set sw_proc_handle [hsi::get_sw_processor]
|
||||
set hw_proc_handle [hsi::get_cells -hier [common::get_property HW_INSTANCE $sw_proc_handle] ]
|
||||
set proctype [common::get_property IP_NAME $hw_proc_handle]
|
||||
set valid_periph 0
|
||||
#Get proper gic instance for periphs in case of zynqmp
|
||||
foreach periph $periphs {
|
||||
if {([string compare -nocase $proctype "ps7_cortexa9"] == 0)||
|
||||
(([string compare -nocase $proctype "psu_cortexa53"] == 0)&&([string compare -nocase $periph "psu_acpu_gic"] == 0))||
|
||||
(([string compare -nocase $proctype "psu_cortexr5"] == 0)&&([string compare -nocase $periph "psu_rcpu_gic"] == 0))} {
|
||||
lappend newperiphs $periph
|
||||
set valid_periph 1
|
||||
}
|
||||
}
|
||||
|
||||
if {!$valid_periph } {
|
||||
error "The scugic driver is not supported for the combination of selected IP and processor";
|
||||
return;
|
||||
}
|
||||
set periphs $newperiphs
|
||||
|
||||
|
||||
|
@ -177,14 +184,21 @@ proc xdefine_zynq_canonical_xpars {drv_handle file_name drv_string args} {
|
|||
set hw_proc_handle [hsi::get_cells -hier [common::get_property HW_INSTANCE $sw_proc_handle] ]
|
||||
set proctype [common::get_property IP_NAME $hw_proc_handle]
|
||||
|
||||
set valid_periph 0
|
||||
#Get proper gic instance for periphs in case of zynqmp
|
||||
foreach periph $periphs {
|
||||
foreach periph $periphs {
|
||||
if {([string compare -nocase $proctype "ps7_cortexa9"] == 0)||
|
||||
(([string compare -nocase $proctype "psu_cortexa53"] == 0)&&([string compare -nocase $periph "psu_acpu_gic"] == 0))||
|
||||
(([string compare -nocase $proctype "psu_cortexr5"] == 0)&&([string compare -nocase $periph "psu_rcpu_gic"] == 0))} {
|
||||
lappend newperiphs $periph
|
||||
lappend newperiphs $periph
|
||||
set valid_periph 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if {!$valid_periph } {
|
||||
error "The scugic driver is not supported for the combination of selected IP and processor";
|
||||
return;
|
||||
}
|
||||
set periphs $newperiphs
|
||||
|
||||
# Get the names of all the peripherals connected to this driver
|
||||
|
@ -298,14 +312,21 @@ proc xdefine_zynq_config_file {drv_handle file_name drv_string args} {
|
|||
set hw_proc_handle [hsi::get_cells -hier [common::get_property HW_INSTANCE $sw_proc_handle] ]
|
||||
set proctype [common::get_property IP_NAME $hw_proc_handle]
|
||||
|
||||
#Get proper gic instance for periphs in case of zynqmp
|
||||
foreach periph $periphs {
|
||||
set valid_periph 0
|
||||
#Get proper gic instance for periphs in case of zynqmp
|
||||
foreach periph $periphs {
|
||||
if {([string compare -nocase $proctype "ps7_cortexa9"] == 0)||
|
||||
(([string compare -nocase $proctype "psu_cortexa53"] == 0)&&([string compare -nocase $periph "psu_acpu_gic"] == 0))||
|
||||
(([string compare -nocase $proctype "psu_cortexr5"] == 0)&&([string compare -nocase $periph "psu_rcpu_gic"] == 0))} {
|
||||
lappend newperiphs $periph
|
||||
lappend newperiphs $periph
|
||||
set valid_periph 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if {!$valid_periph } {
|
||||
error "The scugic driver is not supported for the combination of selected IP and processor";
|
||||
return;
|
||||
}
|
||||
set periphs $newperiphs
|
||||
set start_comma ""
|
||||
foreach periph $periphs {
|
||||
|
|
Loading…
Add table
Reference in a new issue