altera.h 803 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * altera.h
  4. *
  5. * altera FPGA driver
  6. *
  7. * Copyright (C) Altera Corporation 1998-2001
  8. * Copyright (C) 2010 NetUP Inc.
  9. * Copyright (C) 2010 Igor M. Liplianin <[email protected]>
  10. */
  11. #ifndef _ALTERA_H_
  12. #define _ALTERA_H_
  13. struct altera_config {
  14. void *dev;
  15. u8 *action;
  16. int (*jtag_io) (void *dev, int tms, int tdi, int tdo);
  17. };
  18. #if defined(CONFIG_ALTERA_STAPL) || \
  19. (defined(CONFIG_ALTERA_STAPL_MODULE) && defined(MODULE))
  20. extern int altera_init(struct altera_config *config, const struct firmware *fw);
  21. #else
  22. static inline int altera_init(struct altera_config *config,
  23. const struct firmware *fw)
  24. {
  25. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  26. return 0;
  27. }
  28. #endif /* CONFIG_ALTERA_STAPL */
  29. #endif /* _ALTERA_H_ */