diff options
author | Moritz Fischer <moritz.fischer@ettus.com> | 2015-10-20 20:19:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-24 02:49:12 +0300 |
commit | 4d10eaff5bfc69997a769f9c83b749f0a8c542fa (patch) | |
tree | 11e4b285b0cfce0bb33b05a41bc558298c0658d6 /drivers/fpga | |
parent | 6376931babd833dbd6f51e22a3de449ce6c60d61 (diff) | |
download | linux-4d10eaff5bfc69997a769f9c83b749f0a8c542fa.tar.xz |
fpga: zynq-fpga: Change fw format to handle bin instead of bit.
This gets rid of the code to strip away the header and byteswap,
as well as the check for the sync word.
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Reviewed-by: Josh Cartwright <joshc@ni.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fpga')
-rw-r--r-- | drivers/fpga/zynq-fpga.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/fpga/zynq-fpga.c b/drivers/fpga/zynq-fpga.c index 617d38281f49..31db5509f3d4 100644 --- a/drivers/fpga/zynq-fpga.c +++ b/drivers/fpga/zynq-fpga.c @@ -287,9 +287,9 @@ static int zynq_fpga_ops_write(struct fpga_manager *mgr, struct zynq_fpga_priv *priv; int err; char *kbuf; - size_t i, in_count; + size_t in_count; dma_addr_t dma_addr; - u32 transfer_length = 0; + u32 transfer_length; u32 intr_status; in_count = count; @@ -301,26 +301,6 @@ static int zynq_fpga_ops_write(struct fpga_manager *mgr, memcpy(kbuf, buf, count); - /* look for the sync word */ - for (i = 0; i < count - 4; i++) { - if (memcmp(kbuf + i, "\xAA\x99\x55\x66", 4) == 0) { - dev_dbg(priv->dev, "Found swapped sync word\n"); - break; - } - } - - /* remove the header, align the data on word boundary */ - if (i != count - 4) { - count -= i; - memmove(kbuf, kbuf + i, count); - } - - /* fixup endianness of the data */ - for (i = 0; i < count; i += 4) { - u32 *p = (u32 *)&kbuf[i]; - *p = swab32(*p); - } - /* enable clock */ err = clk_enable(priv->clk); if (err) |