altera.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * altera.h
  3. *
  4. * altera FPGA driver
  5. *
  6. * Copyright (C) Altera Corporation 1998-2001
  7. * Copyright (C) 2010 NetUP Inc.
  8. * Copyright (C) 2010 Igor M. Liplianin <liplianin@netup.ru>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. *
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24. */
  25. #ifndef _ALTERA_H_
  26. #define _ALTERA_H_
  27. struct altera_config {
  28. void *dev;
  29. u8 *action;
  30. int (*jtag_io) (void *dev, int tms, int tdi, int tdo);
  31. };
  32. #if defined(CONFIG_ALTERA_STAPL) || \
  33. (defined(CONFIG_ALTERA_STAPL_MODULE) && defined(MODULE))
  34. extern int altera_init(struct altera_config *config, const struct firmware *fw);
  35. #else
  36. static inline int altera_init(struct altera_config *config,
  37. const struct firmware *fw)
  38. {
  39. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  40. return 0;
  41. }
  42. #endif /* CONFIG_ALTERA_STAPL */
  43. #endif /* _ALTERA_H_ */