forked from mirrors/linux
		
	 20d5fa48d3
			
		
	
	
		20d5fa48d3
		
	
	
	
	
		
			
			The format for all ADI AXI IP cores is the same. i.e. 'major.minor.patch'. This patch adds the helper macros to be re-used in ADI AXI drivers. Acked-by: Moritz Fischer <mdf@kernel.org> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			670 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			670 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /* SPDX-License-Identifier: GPL-2.0 */
 | |
| /*
 | |
|  * Analog Devices AXI common registers & definitions
 | |
|  *
 | |
|  * Copyright 2019 Analog Devices Inc.
 | |
|  *
 | |
|  * https://wiki.analog.com/resources/fpga/docs/axi_ip
 | |
|  * https://wiki.analog.com/resources/fpga/docs/hdl/regmap
 | |
|  */
 | |
| 
 | |
| #ifndef ADI_AXI_COMMON_H_
 | |
| #define ADI_AXI_COMMON_H_
 | |
| 
 | |
| #define ADI_AXI_REG_VERSION			0x0000
 | |
| 
 | |
| #define ADI_AXI_PCORE_VER(major, minor, patch)	\
 | |
| 	(((major) << 16) | ((minor) << 8) | (patch))
 | |
| 
 | |
| #define ADI_AXI_PCORE_VER_MAJOR(version)	(((version) >> 16) & 0xff)
 | |
| #define ADI_AXI_PCORE_VER_MINOR(version)	(((version) >> 8) & 0xff)
 | |
| #define ADI_AXI_PCORE_VER_PATCH(version)	((version) & 0xff)
 | |
| 
 | |
| #endif /* ADI_AXI_COMMON_H_ */
 |