gpio: Defined number of instances macro if not defined
This patch adds definition of macro XPAR_XGPIO_NUM_INSTANCES, controls config table parameters with macro XPAR_XGPIO_NUM_INSTANCES. These changes are to avoid compilation errors in Subsystem driver if Subsystem HIP is not included gpio as subcore, results gpio driver not in BSP. Signed-off-by: Shadul Shaikh <shaduls@xilinx.com> Acked-by: Srikanth Vemula <svemula@xilinx.com>
This commit is contained in:
parent
e785a5ff4c
commit
6089affe90
2 changed files with 12 additions and 1 deletions
|
@ -47,6 +47,8 @@
|
|||
* 1.00a rmm 02/04/02 First release
|
||||
* 2.00a jhl 12/16/02 Update for dual channel and interrupt support
|
||||
* 2.11a mta 03/21/07 Updated to new coding style
|
||||
* 4.0 sha 07/15/15 Added XPAR_XGPIO_NUM_INSTANCES macro to control
|
||||
* config table parameters.
|
||||
* </pre>
|
||||
*
|
||||
******************************************************************************/
|
||||
|
@ -76,9 +78,12 @@
|
|||
*/
|
||||
XGpio_Config XGpio_ConfigTable[] = {
|
||||
{
|
||||
#ifdef XPAR_XGPIO_NUM_INSTANCES
|
||||
XPAR_GPIO_0_DEVICE_ID,
|
||||
XPAR_GPIO_0_BASEADDR,
|
||||
XPAR_GPIO_0_INTERRUPT_PRESENT,
|
||||
XPAR_GPIO_0_IS_DUAL}
|
||||
XPAR_GPIO_0_IS_DUAL
|
||||
#endif
|
||||
}
|
||||
};
|
||||
/** @} */
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
* ----- ---- -------- -----------------------------------------------
|
||||
* 2.01a jvb 10/13/05 First release
|
||||
* 2.11a mta 03/21/07 Updated to new coding style
|
||||
* 4.0 sha 07/15/15 Defined macro XPAR_XGPIO_NUM_INSTANCES if not
|
||||
* defined in xparameters.h
|
||||
* </pre>
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
@ -61,6 +63,10 @@
|
|||
|
||||
/************************** Constant Definitions ****************************/
|
||||
|
||||
#ifndef XPAR_XGPIO_NUM_INSTANCES
|
||||
#define XPAR_XGPIO_NUM_INSTANCES 0
|
||||
#endif
|
||||
|
||||
/**************************** Type Definitions ******************************/
|
||||
|
||||
/***************** Macros (Inline Functions) Definitions ********************/
|
||||
|
|
Loading…
Add table
Reference in a new issue