Thomas Gleixner | 74ba920 | 2019-05-20 09:19:02 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Igor M. Liplianin | fa766c9 | 2011-01-25 17:00:00 -0300 | [diff] [blame] | 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 <liplianin@netup.ru> |
Igor M. Liplianin | fa766c9 | 2011-01-25 17:00:00 -0300 | [diff] [blame] | 10 | */ |
| 11 | |
| 12 | #ifndef _ALTERA_H_ |
| 13 | #define _ALTERA_H_ |
| 14 | |
| 15 | struct altera_config { |
| 16 | void *dev; |
| 17 | u8 *action; |
| 18 | int (*jtag_io) (void *dev, int tms, int tdi, int tdo); |
| 19 | }; |
| 20 | |
| 21 | #if defined(CONFIG_ALTERA_STAPL) || \ |
| 22 | (defined(CONFIG_ALTERA_STAPL_MODULE) && defined(MODULE)) |
| 23 | |
| 24 | extern int altera_init(struct altera_config *config, const struct firmware *fw); |
| 25 | #else |
| 26 | |
| 27 | static inline int altera_init(struct altera_config *config, |
| 28 | const struct firmware *fw) |
| 29 | { |
| 30 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
| 31 | return 0; |
| 32 | } |
| 33 | #endif /* CONFIG_ALTERA_STAPL */ |
| 34 | |
| 35 | #endif /* _ALTERA_H_ */ |