axivdma : Modified namespace from HSM to HSI.

Signed-off-by: Kishore Kumar Korathaluri <kkorath@xilinx.com>
This commit is contained in:
Kishore Kumar Korathaluri 2014-12-23 10:58:11 +05:30 committed by Nava kishore Manne
parent 10ad9188b2
commit ed37f2e9a7

View file

@ -67,10 +67,10 @@ proc generate {drv_handle} {
proc xdefine_vdma_include_file {drv_handle file_name drv_string args} { proc xdefine_vdma_include_file {drv_handle file_name drv_string args} {
# Open include file # Open include file
set file_handle [hsm::utils::open_include_file $file_name] set file_handle [hsi::utils::open_include_file $file_name]
# Get all peripherals connected to this driver # Get all peripherals connected to this driver
set periphs [hsm::utils::get_common_driver_ips $drv_handle] set periphs [hsi::utils::get_common_driver_ips $drv_handle]
# Handle special cases # Handle special cases
set arg "NUM_INSTANCES" set arg "NUM_INSTANCES"
@ -78,7 +78,7 @@ proc xdefine_vdma_include_file {drv_handle file_name drv_string args} {
if {$posn > -1} { if {$posn > -1} {
puts $file_handle "/* Definitions for driver [string toupper [get_property NAME $drv_handle]] */" puts $file_handle "/* Definitions for driver [string toupper [get_property NAME $drv_handle]] */"
# Define NUM_INSTANCES # Define NUM_INSTANCES
puts $file_handle "#define [hsm::utils::get_driver_param_name $drv_string $arg] [llength $periphs]" puts $file_handle "#define [hsi::utils::get_driver_param_name $drv_string $arg] [llength $periphs]"
set args [lreplace $args $posn $posn] set args [lreplace $args $posn $posn]
} }
# Check if it is a driver parameter # Check if it is a driver parameter
@ -89,7 +89,7 @@ proc xdefine_vdma_include_file {drv_handle file_name drv_string args} {
if {[llength $value] == 0} { if {[llength $value] == 0} {
lappend newargs $arg lappend newargs $arg
} else { } else {
puts $file_handle "#define [hsm::utils::get_driver_param_name $drv_string $arg] [get_property CONFIG.$arg $drv_handle]" puts $file_handle "#define [hsi::utils::get_driver_param_name $drv_string $arg] [get_property CONFIG.$arg $drv_handle]"
} }
} }
set args $newargs set args $newargs
@ -104,7 +104,7 @@ proc xdefine_vdma_include_file {drv_handle file_name drv_string args} {
set value $device_id set value $device_id
incr device_id incr device_id
} else { } else {
set value [::hsm::utils::get_param_value $periph $arg] set value [::hsi::utils::get_param_value $periph $arg]
} }
if {[llength $value] == 0} { if {[llength $value] == 0} {
set value 0 set value 0
@ -113,16 +113,16 @@ proc xdefine_vdma_include_file {drv_handle file_name drv_string args} {
# to VDMA IPv6.00a (IPI release). For all the previous versions these # to VDMA IPv6.00a (IPI release). For all the previous versions these
# parameters should be set. # parameters should be set.
if {[string first "ENABLE_DEBUG" $arg] >= 0} { if {[string first "ENABLE_DEBUG" $arg] >= 0} {
set foundparam [::hsm::utils::get_param_value $periph $arg] set foundparam [::hsi::utils::get_param_value $periph $arg]
if {[llength $foundparam] == 0} { if {[llength $foundparam] == 0} {
set value 1 set value 1
} }
} }
set value [hsm::utils::format_addr_string $value $arg] set value [hsi::utils::format_addr_string $value $arg]
if {[string compare -nocase "HW_VER" $arg] == 0} { if {[string compare -nocase "HW_VER" $arg] == 0} {
puts $file_handle "#define [hsm::utils::get_ip_param_name $periph $arg] \"$value\"" puts $file_handle "#define [hsi::utils::get_ip_param_name $periph $arg] \"$value\""
} else { } else {
puts $file_handle "#define [hsm::utils::get_ip_param_name $periph $arg] $value" puts $file_handle "#define [hsi::utils::get_ip_param_name $periph $arg] $value"
} }
} }
puts $file_handle "" puts $file_handle ""
@ -133,10 +133,10 @@ proc xdefine_vdma_include_file {drv_handle file_name drv_string args} {
proc xdefine_vdma_canonical_xpars {drv_handle file_name drv_string args} { proc xdefine_vdma_canonical_xpars {drv_handle file_name drv_string args} {
# Open include file # Open include file
set file_handle [hsm::utils::open_include_file $file_name] set file_handle [hsi::utils::open_include_file $file_name]
# Get all the peripherals connected to this driver # Get all the peripherals connected to this driver
set periphs [hsm::utils::get_common_driver_ips $drv_handle] set periphs [hsi::utils::get_common_driver_ips $drv_handle]
# Get the names of all the peripherals connected to this driver # Get the names of all the peripherals connected to this driver
foreach periph $periphs { foreach periph $periphs {
@ -171,12 +171,12 @@ proc xdefine_vdma_canonical_xpars {drv_handle file_name drv_string args} {
set canonical_name [format "%s_%s" $drv_string [lindex $indices $i]] set canonical_name [format "%s_%s" $drv_string [lindex $indices $i]]
foreach arg $args { foreach arg $args {
set lvalue [hsm::utils::get_driver_param_name $canonical_name $arg] set lvalue [hsi::utils::get_driver_param_name $canonical_name $arg]
# The commented out rvalue is the name of the instance-specific constant # The commented out rvalue is the name of the instance-specific constant
# set rvalue [hsm::utils::get_driver_param_name $periph $arg] # set rvalue [hsi::utils::get_driver_param_name $periph $arg]
# The rvalue set below is the actual value of the parameter # The rvalue set below is the actual value of the parameter
set rvalue [::hsm::utils::get_param_value $periph $arg] set rvalue [::hsi::utils::get_param_value $periph $arg]
if {[llength $rvalue] == 0} { if {[llength $rvalue] == 0} {
set rvalue 0 set rvalue 0
} }
@ -184,12 +184,12 @@ proc xdefine_vdma_canonical_xpars {drv_handle file_name drv_string args} {
# to VDMA IPv6.00a (IPI release). For all the previous versions these # to VDMA IPv6.00a (IPI release). For all the previous versions these
# parameters should be set. # parameters should be set.
if {[string first "ENABLE_DEBUG" $arg] >= 0} { if {[string first "ENABLE_DEBUG" $arg] >= 0} {
set foundparam [::hsm::utils::get_param_value $periph $arg] set foundparam [::hsi::utils::get_param_value $periph $arg]
if {[llength $foundparam] == 0} { if {[llength $foundparam] == 0} {
set rvalue 1 set rvalue 1
} }
} }
set rvalue [hsm::utils::format_addr_string $rvalue $arg] set rvalue [hsi::utils::format_addr_string $rvalue $arg]
puts $file_handle "#define $lvalue $rvalue" puts $file_handle "#define $lvalue $rvalue"