mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-10-31 03:58:17 +00:00 
			
		
		
		
	Because all MSCC SoC use the same MDIO bus, put the implementation in one common file(mscc_miim) and make all the other MSCC network drivers to use these functions. Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
		
			
				
	
	
		
			25 lines
		
	
	
		
			588 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			588 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
 | |
| /*
 | |
|  * Copyright (c) 2018 Microsemi Corporation
 | |
|  */
 | |
| 
 | |
| #ifndef _MSCC_MIIM_H_
 | |
| #define _MSCC_MIIM_H_
 | |
| 
 | |
| struct mscc_miim_dev {
 | |
| 	void __iomem *regs;
 | |
| 	phys_addr_t miim_base;
 | |
| 	unsigned long miim_size;
 | |
| 	struct mii_dev *bus;
 | |
| };
 | |
| 
 | |
| int mscc_miim_read(struct mii_dev *bus, int addr, int devad, int reg);
 | |
| int mscc_miim_write(struct mii_dev *bus, int addr, int devad, int reg, u16 val);
 | |
| 
 | |
| struct mii_dev *mscc_mdiobus_init(struct mscc_miim_dev *miim, int *miim_count,
 | |
| 				  phys_addr_t miim_base,
 | |
| 				  unsigned long miim_size);
 | |
| 
 | |
| 
 | |
| #endif /* _MSCC_MIIM_H_ */
 |