Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0734629 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'fpga-for-greg-20161129' of...

Merge tag 'fpga-for-greg-20161129' of git://git.kernel.org/pub/scm/linux/kernel/git/atull/linux-fpga into char-misc-next

Alan writes:

fpga: Updates for 4.10

These are:
 * Add git url to MAINTAINERS
 * Allow write_init to specify how much buffer it needs
 * Fixes for ISR state in zynq fpga manager driver
 * Other small fixes for zynq
 * Add Altera SoCFPGA drivers for COMPILE_TEST
parents 31114fa9 e4998077
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -169,7 +169,10 @@ The programming sequence is:
 2. .write (may be called once or multiple times)
 3. .write_complete

The .write_init function will prepare the FPGA to receive the image data.
The .write_init function will prepare the FPGA to receive the image data.  The
buffer passed into .write_init will be atmost .initial_header_size bytes long,
if the whole bitstream is not immediately available then the core code will
buffer up at least this much before starting.

The .write function writes a buffer to the FPGA. The buffer may be contain the
whole FPGA image or may be a smaller chunk of an FPGA image.  In the latter
+1 −0
Original line number Diff line number Diff line
@@ -4958,6 +4958,7 @@ M: Alan Tull <atull@opensource.altera.com>
R:	Moritz Fischer <moritz.fischer@ettus.com>
L:	linux-fpga@vger.kernel.org
S:	Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/atull/linux-fpga.git
F:	drivers/fpga/
F:	include/linux/fpga/fpga-mgr.h
W:	http://www.rocketboards.org
+3 −2
Original line number Diff line number Diff line
@@ -22,13 +22,14 @@ config FPGA_REGION

config FPGA_MGR_SOCFPGA
	tristate "Altera SOCFPGA FPGA Manager"
	depends on ARCH_SOCFPGA
	depends on ARCH_SOCFPGA || COMPILE_TEST
	help
	  FPGA manager driver support for Altera SOCFPGA.

config FPGA_MGR_SOCFPGA_A10
	tristate "Altera SoCFPGA Arria10"
	depends on ARCH_SOCFPGA
	depends on ARCH_SOCFPGA || COMPILE_TEST
	select REGMAP_MMIO
	help
	  FPGA manager driver support for Altera Arria10 SoCFPGA.

+4 −2
Original line number Diff line number Diff line
@@ -53,10 +53,12 @@ int fpga_mgr_buf_load(struct fpga_manager *mgr, struct fpga_image_info *info,
	/*
	 * Call the low level driver's write_init function.  This will do the
	 * device-specific things to get the FPGA into the state where it is
	 * ready to receive an FPGA image.
	 * ready to receive an FPGA image. The low level driver only gets to
	 * see the first initial_header_size bytes in the buffer.
	 */
	mgr->state = FPGA_MGR_STATE_WRITE_INIT;
	ret = mgr->mops->write_init(mgr, info, buf, count);
	ret = mgr->mops->write_init(mgr, info, buf,
				    min(mgr->mops->initial_header_size, count));
	if (ret) {
		dev_err(dev, "Error preparing FPGA for writing\n");
		mgr->state = FPGA_MGR_STATE_WRITE_INIT_ERR;
+1 −0
Original line number Diff line number Diff line
@@ -470,6 +470,7 @@ static enum fpga_mgr_states socfpga_a10_fpga_state(struct fpga_manager *mgr)
}

static const struct fpga_manager_ops socfpga_a10_fpga_mgr_ops = {
	.initial_header_size = (RBF_DECOMPRESS_OFFSET + 1) * 4,
	.state = socfpga_a10_fpga_state,
	.write_init = socfpga_a10_fpga_write_init,
	.write = socfpga_a10_fpga_write,
Loading