From 57902f1983b9589e25dc4898d0506e4e16286049 Mon Sep 17 00:00:00 2001 From: Kedareswara rao Appana Date: Wed, 6 Aug 2014 19:09:27 +0530 Subject: [PATCH] axiethernet: fix issues with the open/close of file in the driver tcl This patch fixes the issues with the open/close of the files in the driver tcl. Signed-off-by: Kedareswara rao Appana Acked-by: Anirudha Sarangi --- .../drivers/axiethernet/data/axiethernet.tcl | 11 ++++++++--- .../drivers/axiethernet/src/xaxiethernet.h | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/XilinxProcessorIPLib/drivers/axiethernet/data/axiethernet.tcl b/XilinxProcessorIPLib/drivers/axiethernet/data/axiethernet.tcl index a49b494b..5af0fbda 100755 --- a/XilinxProcessorIPLib/drivers/axiethernet/data/axiethernet.tcl +++ b/XilinxProcessorIPLib/drivers/axiethernet/data/axiethernet.tcl @@ -39,6 +39,8 @@ # operation (CR 704195) # 08/06/13 srt Added support to handle multiple instances of AxiEthernet # FIFO interface (CR 721141) +# 06/08/14 adk Modified the driver tcl to handle the open/close of files +# properly (CR 810643) # ############################################################################### #uses "xillib.tcl" @@ -105,14 +107,15 @@ proc xdefine_axiethernet_include_file {drv_handle file_name drv_string} { } puts $file_handle "\#define [::hsm::utils::get_driver_param_name $drv_string NUM_INSTANCES] $periph_ninstances" - + close $file_handle # Now print all useful parameters for all peripherals set device_id 0 foreach periph $periphs { - puts $file_handle "" + #puts $file_handle "" xdefine_include_file $drv_handle "xparameters.h" "XAxiEthernet" "NUM_INSTANCES" "DEVICE_ID" "C_BASEADDR" "C_HIGHADDR" "C_TYPE" "C_TXCSUM" "C_RXCSUM" "C_PHY_TYPE" "C_TXVLAN_TRAN" "C_RXVLAN_TRAN" "C_TXVLAN_TAG" "C_RXVLAN_TAG" "C_TXVLAN_STRP" "C_RXVLAN_STRP" "C_MCAST_EXTEND" "C_STATS" "C_AVB" "C_PHYADDR" - + + set file_handle [::hsm::utils::open_include_file $file_name] # Create canonical definitions xdefine_temac_params_canonical $file_handle $periph $device_id @@ -123,11 +126,13 @@ proc xdefine_axiethernet_include_file {drv_handle file_name drv_string} { incr device_id puts $file_handle "\n" + close $file_handle } # ------------------------------------------------------- # PART 2 -- AXIFIFO/AXIDMA Connection related parameters # ------------------------------------------------------- + set file_handle [::hsm::utils::open_include_file $file_name] xdefine_axi_target_params $periphs $file_handle puts $file_handle "\n/******************************************************************/\n" diff --git a/XilinxProcessorIPLib/drivers/axiethernet/src/xaxiethernet.h b/XilinxProcessorIPLib/drivers/axiethernet/src/xaxiethernet.h index 615f7024..a4ace72d 100755 --- a/XilinxProcessorIPLib/drivers/axiethernet/src/xaxiethernet.h +++ b/XilinxProcessorIPLib/drivers/axiethernet/src/xaxiethernet.h @@ -451,6 +451,9 @@ * * 4.1 adk 21/04/14 - Fixed CR:780537 Changes are Made in the file * axiethernet test-app tcl +* 4.2 adk 08/08/15 - Fixed CR:810643 SDK generated 'xparamters.h' erroneously +* generated with errors due to part of '#define' misplaced +* changes are made in the driver tcl file. * * ******************************************************************************/