tmrctr: Added AXI clock frequency to config.

Expose the AXI bus clock frequency to the higher-level.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
Acked-by: Shadul Shaikh <shaduls@xilinx.com>
This commit is contained in:
Andrei-Liviu Simion 2015-10-09 03:51:45 -07:00 committed by Nava kishore Manne
parent eb17e0e830
commit b926ec9238
3 changed files with 5 additions and 4 deletions

View file

@ -39,8 +39,7 @@
proc generate {drv_handle} {
xdefine_include_file $drv_handle "xparameters.h" "XTmrCtr" "NUM_INSTANCES" "DEVICE_ID" "C_BASEADDR" "C_HIGHADDR" "CLOCK_FREQ_HZ"
::hsi::utils::define_config_file $drv_handle "xtmrctr_g.c" "XTmrCtr" "DEVICE_ID" "C_BASEADDR"
::hsi::utils::define_config_file $drv_handle "xtmrctr_g.c" "XTmrCtr" "DEVICE_ID" "C_BASEADDR" "CLOCK_FREQ_HZ"
xdefine_canonical_xpars $drv_handle "xparameters.h" "TmrCtr" "DEVICE_ID" "C_BASEADDR" "C_HIGHADDR" "CLOCK_FREQ_HZ"
}

View file

@ -211,8 +211,9 @@ extern "C" {
* This typedef contains configuration information for the device.
*/
typedef struct {
u16 DeviceId; /**< Unique ID of device */
u32 BaseAddress;/**< Register base address */
u16 DeviceId; /**< Unique ID of device */
u32 BaseAddress; /**< Register base address */
u32 SysClockFreqHz; /**< The AXI bus clock frequency */
} XTmrCtr_Config;
/**

View file

@ -80,6 +80,7 @@ XTmrCtr_Config XTmrCtr_ConfigTable[] = {
{
XPAR_TMRCTR_0_DEVICE_ID,
XPAR_TMRCTR_0_BASEADDR,
XPAR_TMRCTR_0_CLOCK_FREQ_HZ,
}
#endif
};