Skip to contentSkip to conversation

Altera FPGA firmware download module.

PATCH Superseded Igor M. Liplianin 1 participant 1 message Jan 1, 2011

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/18 Altera FPGA firmware download module.

It uses STAPL files and programs Altera FPGA through JTAG. Interface to JTAG must be provided from main device module, for example through cx23885 GPIO.

---
 drivers/misc/Kconfig                     |    1 +
 drivers/misc/Makefile                    |    1 +
 drivers/misc/altera-stapl/Kconfig        |    8 +
 drivers/misc/altera-stapl/Makefile       |    3 +
 drivers/misc/altera-stapl/altera-comp.c  |  142 ++
 drivers/misc/altera-stapl/altera-exprt.h |   33 +
 drivers/misc/altera-stapl/altera-jtag.c  | 1020 ++++++++++++
 drivers/misc/altera-stapl/altera-jtag.h  |  113 ++
 drivers/misc/altera-stapl/altera-lpt.c   |   70 +
 drivers/misc/altera-stapl/altera.c       | 2513 ++++++++++++++++++++++++++++++
 include/misc/altera.h                    |   49 +
 11 files changed, 3953 insertions(+), 0 deletions(-)
 create mode 100644 drivers/misc/altera-stapl/Kconfig
 create mode 100644 drivers/misc/altera-stapl/Makefile
 create mode 100644 drivers/misc/altera-stapl/altera-comp.c
 create mode 100644 drivers/misc/altera-stapl/altera-exprt.h
 create mode 100644 drivers/misc/altera-stapl/altera-jtag.c
 create mode 100644 drivers/misc/altera-stapl/altera-jtag.h
 create mode 100644 drivers/misc/altera-stapl/altera-lpt.c
 create mode 100644 drivers/misc/altera-stapl/altera.c
 create mode 100644 include/misc/altera.h
drivers/misc/Kconfig +1 -0
index 4d073f1..f3f8044 100644
@@ -457,5 +457,6 @@ source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
 source "drivers/misc/iwmc3200top/Kconfig"
 source "drivers/misc/ti-st/Kconfig"
+source "drivers/misc/altera-stapl/Kconfig"
 
 endif # MISC_DEVICES
drivers/misc/Makefile +1 -0
index 98009cc..3c1e6ff 100644
@@ -42,3 +42,4 @@ obj-$(CONFIG_ARM_CHARLCD)	+= arm-charlcd.o
 obj-$(CONFIG_PCH_PHUB)		+= pch_phub.o
 obj-y				+= ti-st/
 obj-$(CONFIG_AB8500_PWM)	+= ab8500-pwm.o
+obj-y				+= altera-stapl/
drivers/misc/altera-stapl/Kconfig new file +8 -0
new file mode 100644
index 0000000..7f01d8e
@@ -0,0 +1,8 @@
+comment "Altera FPGA firmware download module"
+
+config ALTERA_STAPL
+	tristate "Altera FPGA firmware download module"
+	depends on I2C
+	default n
+	help
+	  An Altera FPGA module. Say Y when you want to support this tool.
drivers/misc/altera-stapl/Makefile new file +3 -0
new file mode 100644
index 0000000..055f61e
@@ -0,0 +1,3 @@
+altera-stapl-objs = altera-lpt.o altera-jtag.o altera-comp.o altera.o
+
+obj-$(CONFIG_ALTERA_STAPL) += altera-stapl.o
drivers/misc/altera-stapl/altera-comp.c new file +142 -0

142 lines not on this page · raw message

drivers/misc/altera-stapl/altera-exprt.h new file +33 -0
new file mode 100644
index 0000000..39c38d8
@@ -0,0 +1,33 @@
+/*
+ * altera-exprt.h
+ *
+ * altera FPGA driver
+ *
+ * Copyright (C) Altera Corporation 1998-2001
+ * Copyright (C) 2010 NetUP Inc.
+ * Copyright (C) 2010 Igor M. Liplianin <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef ALTERA_EXPRT_H
+#define ALTERA_EXPRT_H
+
+
+u32 altera_shrink(u8 *in, u32 in_length, u8 *out, u32 out_length, s32 version);
+int netup_jtag_io_lpt(void *device, int tms, int tdi, int read_tdo);
+
+#endif /* ALTERA_EXPRT_H */
drivers/misc/altera-stapl/altera-jtag.c new file +1020 -0

1,020 lines not on this page · raw message

drivers/misc/altera-stapl/altera-jtag.h new file +113 -0

113 lines not on this page · raw message

drivers/misc/altera-stapl/altera-lpt.c new file +70 -0

70 lines not on this page · raw message

drivers/misc/altera-stapl/altera.c new file +2513 -0

1,601 lines not on this page · raw message

include/misc/altera.h new file +49 -0

49 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.1

Part of the diff is not shown here. View the raw message.