From 297266c370e47636ef2aacf7581ef4d3ff0cc4f8 Mon Sep 17 00:00:00 2001 From: Kedareswara rao Appana Date: Wed, 20 Aug 2014 12:30:32 +0530 Subject: [PATCH] uartns550: handle device_id value in cannoical definitions properly This patch fixes the issue Canonical Definition of Multiple Instances of UARTSNS550 have the same Device Id. Signed-off-by: Kedareswara rao Appana --- XilinxProcessorIPLib/drivers/uartns550/data/uartns550.tcl | 8 +++++++- XilinxProcessorIPLib/drivers/uartns550/src/xuartns550.h | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/XilinxProcessorIPLib/drivers/uartns550/data/uartns550.tcl b/XilinxProcessorIPLib/drivers/uartns550/data/uartns550.tcl index e112f7b2..7530554b 100755 --- a/XilinxProcessorIPLib/drivers/uartns550/data/uartns550.tcl +++ b/XilinxProcessorIPLib/drivers/uartns550/data/uartns550.tcl @@ -34,6 +34,8 @@ # Ver Who Date Changes # -------- ------ -------- ------------------------------------ # 3.0 adk 12/10/13 Updated as per the New Tcl API's +# 3.1 adk 20/08/14 Fixed CR:816989 Canonical Definition for Multiple +# Instances of UARTSNS550 have the same Device Id. ############################################################################## ## @BEGIN_CHANGELOG EDK_L ## Deprecated the CLOCK_HZ parameter in mdd and updated the Tcl to obtain the @@ -205,6 +207,7 @@ proc xdefine_canonical_xpars {drv_handle file_name drv_string args} { } set i 0 + set device_id 0 foreach periph $periphs { set periph_name [string toupper [get_property NAME $periph]] @@ -220,7 +223,10 @@ proc xdefine_canonical_xpars {drv_handle file_name drv_string args} { #handle CLOCK_FREQ_HZ as a special case if {[string compare -nocase "CLOCK_FREQ_HZ" $arg] == 0} { set rvalue [::hsm::utils::get_ip_param_name $periph $arg] - } else { + } elseif {[string compare -nocase "DEVICE_ID" $arg] == 0} { + set rvalue $device_id + incr device_id + } else { set rvalue [get_property CONFIG.$arg $periph] if {[llength $rvalue] == 0} { set rvalue 0 diff --git a/XilinxProcessorIPLib/drivers/uartns550/src/xuartns550.h b/XilinxProcessorIPLib/drivers/uartns550/src/xuartns550.h index d6c2fed8..40af195b 100755 --- a/XilinxProcessorIPLib/drivers/uartns550/src/xuartns550.h +++ b/XilinxProcessorIPLib/drivers/uartns550/src/xuartns550.h @@ -153,6 +153,9 @@ * 2.02a adk 09/16/13 Fixed CR:735289 changes are made in the xuartns550_intr.c * file. * 3.0 adk 19/12/13 Updated as per the New Tcl API's +* 3.1 adk 20/08/14 Fixed CR:816989 Canonical Definition for Multiple +* Instances of UARTSNS550 have the same Device Id. +* Changes are made in the driver tcl file. * * *****************************************************************************/