diff --git a/XilinxProcessorIPLib/drivers/csudma/src/Makefile b/XilinxProcessorIPLib/drivers/csudma/src/Makefile new file mode 100644 index 00000000..778797bc --- /dev/null +++ b/XilinxProcessorIPLib/drivers/csudma/src/Makefile @@ -0,0 +1,40 @@ +COMPILER= +ARCHIVER= +CP=cp +COMPILER_FLAGS= +EXTRA_COMPILER_FLAGS= +LIB=libxil.a + +CC_FLAGS = $(COMPILER_FLAGS) +ECC_FLAGS = $(EXTRA_COMPILER_FLAGS) + +RELEASEDIR=../../../lib +INCLUDEDIR=../../../include +INCLUDES=-I./. -I${INCLUDEDIR} + +OUTS = *.o + +LIBSOURCES:=*.c +INCLUDEFILES:=*.h + +OBJECTS = $(addsuffix .o, $(basename $(wildcard *.c))) + +libs: banner csudma_libs clean + +%.o: %.c + ${COMPILER} $(CC_FLAGS) $(ECC_FLAGS) $(INCLUDES) -o $@ $< + +banner: + echo "Compiling csudma" + +csudma_libs: ${OBJECTS} + $(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OBJECTS} + +.PHONY: include +include: csudma_includes + +csudma_includes: + ${CP} ${INCLUDEFILES} ${INCLUDEDIR} + +clean: + rm -rf ${OBJECTS} diff --git a/XilinxProcessorIPLib/drivers/csudma/src/xcsudma_g.c b/XilinxProcessorIPLib/drivers/csudma/src/xcsudma_g.c index 9f4e5604..df78ee7a 100644 --- a/XilinxProcessorIPLib/drivers/csudma/src/xcsudma_g.c +++ b/XilinxProcessorIPLib/drivers/csudma/src/xcsudma_g.c @@ -1,55 +1,53 @@ -/****************************************************************************** + +/******************************************************************* * -* Copyright (C) 2014 Xilinx, Inc. All rights reserved. +* CAUTION: This file is automatically generated by HSI. +* Version: +* DO NOT EDIT. * -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: +* Copyright (C) 2010-2015 Xilinx, Inc. All Rights Reserved.* +*Permission is hereby granted, free of charge, to any person obtaining a copy +*of this software and associated documentation files (the Software), to deal +*in the Software without restriction, including without limitation the rights +*to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +*copies of the Software, and to permit persons to whom the Software is +*furnished to do so, subject to the following conditions: * -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. +*The above copyright notice and this permission notice shall be included in +*all copies or substantial portions of the Software. * * Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. +*(a) running on a Xilinx device, or +*(b) that interact with a Xilinx device through a bus or interconnect. * -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. +*THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +*IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +*FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +*XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +*WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT +*OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. +*Except as contained in this notice, the name of the Xilinx shall not be used +*in advertising or otherwise to promote the sale, use or other dealings in +*this Software without prior written authorization from Xilinx. * -******************************************************************************/ -/*****************************************************************************/ -/** -* -* @file xcsudma_g.c -* This file contains the ConfigTable -*
-* MODIFICATION HISTORY: -* -* Ver Who Date Changes -* ----- ------ -------- ----------------------------------------------------- -* 1.0 vnsld 22/10/14 First release -*-* -******************************************************************************/ +* +* Description: Driver configuration +* +*******************************************************************/ + +#include "xparameters.h" #include "xcsudma.h" +/* +* The configuration table for devices +*/ + XCsuDma_Config XCsuDma_ConfigTable[] = { { - 0, - 0xFFC80000 + XPAR_PSS_CSUDMA_DEVICE_ID, + XPAR_PSS_CSUDMA_BASEADDR } }; diff --git a/XilinxProcessorIPLib/drivers/csudma/src/xcsudma_hw.h b/XilinxProcessorIPLib/drivers/csudma/src/xcsudma_hw.h index 0615c742..98aeb42e 100644 --- a/XilinxProcessorIPLib/drivers/csudma/src/xcsudma_hw.h +++ b/XilinxProcessorIPLib/drivers/csudma/src/xcsudma_hw.h @@ -86,7 +86,8 @@ extern "C" { /** @name CSU Base address and CSU_DMA reset offset * @{ */ -#define XCSU_BASEADDRESS 0xFFCA0000U /**< CSU Base Address */ +#define XCSU_BASEADDRESS XPAR_PSS_CSU_0_S_AXI_BASEADDR + /**< CSU Base Address */ #define XCSU_DMA_RESET_OFFSET 0x0000000CU /**< CSU_DMA Reset offset */ /*@}*/ diff --git a/XilinxProcessorIPLib/drivers/csudma/src/xcsudma_sinit.c b/XilinxProcessorIPLib/drivers/csudma/src/xcsudma_sinit.c index 4dc32707..a8ab6a00 100644 --- a/XilinxProcessorIPLib/drivers/csudma/src/xcsudma_sinit.c +++ b/XilinxProcessorIPLib/drivers/csudma/src/xcsudma_sinit.c @@ -54,8 +54,6 @@ /************************** Constant Definitions *****************************/ -#define XPAR_CSUDMA_NUM_INSTANCES 1 /**< XPAR_XCSUDMA_NUM_INSTANCES */ - /***************** Macros (Inline Functions) Definitions *********************/ @@ -89,12 +87,12 @@ ******************************************************************************/ XCsuDma_Config *XCsuDma_LookupConfig(u16 DeviceId) { - extern XCsuDma_Config XCsuDma_ConfigTable[XPAR_CSUDMA_NUM_INSTANCES]; + extern XCsuDma_Config XCsuDma_ConfigTable[XPAR_XCSUDMA_NUM_INSTANCES]; XCsuDma_Config *CfgPtr = NULL; u32 Index; /* Checks all the instances */ - for (Index = (u32)0x0; Index < (u32)(XPAR_CSUDMA_NUM_INSTANCES); + for (Index = (u32)0x0; Index < (u32)(XPAR_XCSUDMA_NUM_INSTANCES); Index++) { if (XCsuDma_ConfigTable[Index].DeviceId == DeviceId) { CfgPtr = &XCsuDma_ConfigTable[Index];