xref: /openbmc/u-boot/drivers/misc/gdsys_soc.h (revision 872cfa20)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2017
4  * Mario Six,  Guntermann & Drunck GmbH, mario.six@gdsys.cc
5  */
6 
7 #ifndef _GDSYS_SOC_H_
8 #define _GDSYS_SOC_H_
9 
10 /**
11  * gdsys_soc_get_fpga() - Retrieve pointer to parent bus' FPGA device
12  * @child:	The child device on the FPGA bus needing access to the FPGA.
13  * @fpga:	Pointer to the retrieved FPGA device.
14  *
15  * To access their register maps, devices on gdsys soc buses usually have
16  * facilitate the accessor function of the IHS FPGA their parent bus is
17  * attached to. To access the FPGA device from within the bus' children, this
18  * function returns a pointer to it.
19  *
20  * Return: 0 on success, -ve on failure
21  */
22 int gdsys_soc_get_fpga(struct udevice *child, struct udevice **fpga);
23 #endif /* _GDSYS_SOC_H_ */
24