From: Chee, Tien Fong <tien.fong.chee@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/7] arm: socfpga: Add Arria10 FPGA manager program assembly driver
Date: Mon, 8 May 2017 04:03:30 +0000 [thread overview]
Message-ID: <1494216209.11021.13.camel@intel.com> (raw)
In-Reply-To: <1d290dd3-0cca-41a1-15c1-27c8098e8bf5@denx.de>
On Jum, 2017-05-05 at 13:14 +0200, Marek Vasut wrote:
> On 05/05/2017 12:26 PM, tien.fong.chee at intel.com wrote:
> >
> > From: Tien Fong Chee <tien.fong.chee@intel.com>
> >
> > Adding the Arria10 FPGA manager program assembly driver which can
> > be used
> > to feed bitstream into FPGA manager for configuring FPGA.
> >
> > Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
> > ---
> > arch/arm/mach-socfpga/Makefile | 1 +
> > arch/arm/mach-socfpga/lowlevel_init.S | 48
> > +++++++++++++++++++++++++++++++++
> > 2 files changed, 49 insertions(+), 0 deletions(-)
> > create mode 100644 arch/arm/mach-socfpga/lowlevel_init.S
> >
> > diff --git a/arch/arm/mach-socfpga/Makefile b/arch/arm/mach-
> > socfpga/Makefile
> > index 824cd8e..8b86dc7 100644
> > --- a/arch/arm/mach-socfpga/Makefile
> > +++ b/arch/arm/mach-socfpga/Makefile
> > @@ -24,6 +24,7 @@ endif
> >
> > ifdef CONFIG_TARGET_SOCFPGA_ARRIA10
> > obj-y += clock_manager_arria10.o
> > +obj-y += lowlevel_init.o
> > obj-y += misc_arria10.o
> > obj-y += pinmux_arria10.o
> > obj-y += reset_manager_arria10.o
> > diff --git a/arch/arm/mach-socfpga/lowlevel_init.S b/arch/arm/mach-
> > socfpga/lowlevel_init.S
> > new file mode 100644
> > index 0000000..79e9d07
> > --- /dev/null
> > +++ b/arch/arm/mach-socfpga/lowlevel_init.S
> > @@ -0,0 +1,48 @@
> > +/*
> > + * Copyright (C) 2017 Intel Corporation <www.intel.com>
> > + *
> > + * SPDX-License-Identifier: GPL-2.0
> > + */
> > +
> > +#include <asm-offsets.h>
> > +#include <config.h>
> > +#include <linux/linkage.h>
> > +
> > +/*
> > + * Write RBF data in burst form to FPGA Manager
> > + * [r0] RBF binary source address
> > + * [r1] FPGA Manager data address
> > + * [r2] RBF data length
> > + */
> We do the same for Gen5 in C code with a bit of assembly, so do the
> same.
>
Okay, i just saw it, thanks for pointing out.
> >
> > +ENTRY(fpgamgr_axi_write)
> > + PUSH {r4-r11, lr} /* save registers per
> > AAPCS */
> > +
> > +write_burst:
> > + cmp r2,#32
> > + beq write_burst_cont
> > + bls write_word
> > +write_burst_cont:
> > + ldmia r0!, {r4-r11}
> > + stmia r1, {r4-r11}
> > + subs r2, r2, #32
> > + b write_burst
> > +
> > +write_word:
> > + cmp r2,#4
> > + beq write_word_cont
> > + bls write_byte
> > +write_word_cont:
> > + ldmia r0!, {r4}
> > + stmia r1, {r4}
> > + subs r2, r2, #4
> > + b write_word
> > +
> > +write_byte:
> > + cmp r2,#0
> > + beq write_end
> > + ldr r3, [r0]
> > + str r3, [r1]
> > +write_end:
> > + POP {r4-r11, pc}
> > +ENDPROC(fpgamgr_axi_write)
> >
>
next prev parent reply other threads:[~2017-05-08 4:03 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-05 10:26 [U-Boot] [PATCH 0/7] Add Intel Arria 10 SoC FPGA driver tien.fong.chee at intel.com
2017-05-05 10:26 ` [U-Boot] [PATCH 1/7] arm: socfpga: Remove unused passing parameter of socfpga_bridges_reset tien.fong.chee at intel.com
2017-05-05 11:09 ` Marek Vasut
2017-05-08 4:17 ` Chee, Tien Fong
2017-05-08 9:52 ` Marek Vasut
2017-05-09 4:23 ` Chee, Tien Fong
2017-05-09 7:56 ` Marek Vasut
2017-05-10 8:34 ` Chee, Tien Fong
2017-05-05 10:26 ` [U-Boot] [PATCH 2/7] arm: socfpga: Convert FPGA configuration to Kconfig method tien.fong.chee at intel.com
2017-05-05 11:11 ` Marek Vasut
2017-05-08 3:02 ` Chee, Tien Fong
2017-05-08 9:57 ` Marek Vasut
2017-05-09 5:02 ` Chee, Tien Fong
2017-05-09 7:58 ` Marek Vasut
2017-05-10 8:28 ` Chee, Tien Fong
2017-05-11 4:09 ` Chee, Tien Fong
2017-05-11 11:47 ` Marek Vasut
2017-05-05 10:26 ` [U-Boot] [PATCH 3/7] arm: socfpga: Restructure FPGA driver in the preparation to support A10 tien.fong.chee at intel.com
2017-05-05 11:13 ` Marek Vasut
2017-05-08 4:39 ` Chee, Tien Fong
2017-05-08 10:16 ` Marek Vasut
2017-05-09 4:00 ` Chee, Tien Fong
2017-05-05 10:26 ` [U-Boot] [PATCH 4/7] arm: socfpga: Move FPGA manager driver to FPGA driver tien.fong.chee at intel.com
2017-05-05 10:26 ` [U-Boot] [PATCH 5/7] arm: socfpga: Move the FPGA driver header from arch to include directory tien.fong.chee at intel.com
2017-05-05 10:26 ` [U-Boot] [PATCH 6/7] arm: socfpga: Add Arria10 FPGA manager program assembly driver tien.fong.chee at intel.com
2017-05-05 11:14 ` Marek Vasut
2017-05-08 4:03 ` Chee, Tien Fong [this message]
2017-05-05 10:26 ` [U-Boot] [PATCH 7/7] arm: socfpga: Add FPGA driver support for Arria 10 tien.fong.chee at intel.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1494216209.11021.13.camel@intel.com \
--to=tien.fong.chee@intel.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.