From 62177f171769b48a4a8e70b218fb402fb02872bc Mon Sep 17 00:00:00 2001 From: Harini Katakam Date: Thu, 15 Oct 2015 16:46:03 +0530 Subject: [PATCH] emacps: Select interrupt ID in example based on instance present Different GEM instances are present on evaluation and emulation platforms of Zynq Ultrascale+ MPSoC. To allow for automatic testing, select XPS_GEMx_INTR_ID based on the PSU_<> present. Left initial definition intact for Zynq. Signed-off-by: Harini Katakam Acked by: Punnaiah Choudary Kalluri --- .../emacps/examples/xemacps_example_intr_dma.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/XilinxProcessorIPLib/drivers/emacps/examples/xemacps_example_intr_dma.c b/XilinxProcessorIPLib/drivers/emacps/examples/xemacps_example_intr_dma.c index ff4c2cbf..44ffe405 100644 --- a/XilinxProcessorIPLib/drivers/emacps/examples/xemacps_example_intr_dma.c +++ b/XilinxProcessorIPLib/drivers/emacps/examples/xemacps_example_intr_dma.c @@ -106,8 +106,9 @@ * 3.0 kpc 01/23/14 Removed PEEP board related code * 3.0 hk 03/18/15 Added support for jumbo frames. * Add cache flush after BD terminate entries. -* 3.2 hk 09/30/15 Added clock control using CRL_APB_GEM_REF_CTRL register. +* 3.2 hk 10/15/15 Added clock control using CRL_APB_GEM_REF_CTRL register. * Enabled 1G speed for ZynqMP GEM. +* Select GEM interrupt based on instance present. * * * @@ -129,6 +130,19 @@ #define INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID #define EMACPS_IRPT_INTR XPS_GEM0_INT_ID +#ifdef XPAR_PSU_ETHERNET_3_DEVICE_ID +#define EMACPS_IRPT_INTR XPS_GEM3_INT_ID +#endif +#ifdef XPAR_PSU_ETHERNET_2_DEVICE_ID +#define EMACPS_IRPT_INTR XPS_GEM2_INT_ID +#endif +#ifdef XPAR_PSU_ETHERNET_1_DEVICE_ID +#define EMACPS_IRPT_INTR XPS_GEM1_INT_ID +#endif +#ifdef XPAR_PSU_ETHERNET_0_DEVICE_ID +#define EMACPS_IRPT_INTR XPS_GEM0_INT_ID +#endif + #define RXBD_CNT 32 /* Number of RxBDs to use */ #define TXBD_CNT 32 /* Number of TxBDs to use */