gdsys_soc.h 777 B

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