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 26#ifndef _ALTERA_H_ 27#define _ALTERA_H_ 28 29struct altera_config { 30 void *dev; 31 u8 *action; 32 int (*jtag_io) (void *dev, int tms, int tdi, int tdo); 33}; 34 35#if defined(CONFIG_ALTERA_STAPL) || \ 36 (defined(CONFIG_ALTERA_STAPL_MODULE) && defined(MODULE)) 37 38extern int altera_init(struct altera_config *config, const struct firmware *fw); 39#else 40 41static inline int altera_init(struct altera_config *config, 42 const struct firmware *fw) 43{ 44 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 45 return 0; 46} 47#endif /* CONFIG_ALTERA_STAPL */ 48 49#endif /* _ALTERA_H_ */ 50