[PATCH v6 15/18] fpga: region: move device tree support to of-fpga-region.c

2017-11-15 Thread Alan Tull
* of_fpga_region_notify_post_remove * of_fpga_region_notify * of_fpga_region_probe * of_fpga_region_remove Create two new functions with some code from fpga_region_init/exit. * of_fpga_region_init * of_fpga_region_exit Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v2: sp

[PATCH v6 16/18] fpga: of-fpga-region: accept overlays that don't program FPGA

2017-11-15 Thread Alan Tull
The FPGA may already have a static image programmed when Linux boots. In that case a DT overlay may be used to add the devices that already exist. This commit allows that by shuffling the order of some checks. Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@k

[PATCH v6 18/18] fpga: add attribute groups

2017-11-15 Thread Alan Tull
-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v4: Patch added to patchset in v4 v5: no change to this patch in this version of patchset v6: Add Moritz' ack --- drivers/fpga/fpga-bridge.c | 1 + drivers/fpga/fpga-mgr.c | 1 + drive

[PATCH v6 13/18] fpga: region: add register/unregister functions

2017-11-15 Thread Alan Tull
to the region struct * use region->info in of_fpga_region_get_bridges Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v2: split out from another patch v3: use region->info, remove info param where applicable v4: no change to this pat

[PATCH v6 17/18] fpga: clean up fpga Kconfig

2017-11-15 Thread Alan Tull
<*> Technologic Systems TS-73xx SBC FPGA Manager <*> FPGA Bridge Framework <*> Altera SoCFPGA FPGA Bridges <*> Altera FPGA Freeze Bridge <*> Xilinx LogiCORE PR Decoupler <*> FPGA Region <*> FPGA Region Devi

[PATCH v6 11/18] fpga: region: add fpga-region.h header

2017-11-15 Thread Alan Tull
* Create fpga-region.h. * Export fpga_region_program_fpga. * Move struct fpga_region and other things to the header. This is a step in separating FPGA region common code from Device Tree support. Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> -

[PATCH v6 09/18] fpga: region: use image info as parameter for programming region

2017-11-15 Thread Alan Tull
Use FPGA image info (region->info) when region code is programming the FPGA to pass in multiple parameters. This is a baby step in refactoring the FPGA region code to separate out common FPGA region code from FPGA region Device Tree overlay support. Signed-off-by: Alan Tull <at...@kern

[PATCH v6 06/18] fpga: region: get mgr early on

2017-11-15 Thread Alan Tull
Get the FPGA manager during region creation. This is a baby step in refactoring the FPGA region code to separate out common FPGA region code from FPGA region Device Tree overlay support. Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v2: sp

[PATCH v6 07/18] fpga: region: check for child regions before allocing image info

2017-11-15 Thread Alan Tull
FPGA region Device Tree overlay support. Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v2: split out from another patch v3: s/dev/>dev/ in one place add Moritz' ack v4: no change to this patch in this version of patchset v5: no chang

[PATCH v6 05/18] fpga: region: remove unneeded of_node_get and put

2017-11-15 Thread Alan Tull
Remove of_node_get/put in fpga_region_get/put. Not needed and will get in the way when I separate out the common FPGA region code from Device Tree support code. Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v2: split out from another p

[PATCH v6 10/18] fpga: region: separate out code that parses the overlay

2017-11-15 Thread Alan Tull
Tree overlay support. Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v2: split out from another patch v3: update comments minor changes in flow v4: no change to this patch in this version of patchset v5: no change to this patch in

[PATCH v6 08/18] fpga: region: fix slow warning with more than one overlay

2017-11-15 Thread Alan Tull
ote that overlays that make DT changes without reprogramming the FPGA are exempt from this restriction. Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v2: split out from another patch v3: better explanation in header v4: no change to this patch

[PATCH v6 12/18] fpga: region: rename some functions prior to moving

2017-11-15 Thread Alan Tull
ion. * of_fpga_region_get_bridges change second parameter to FPGA image info. Export of_fpga_region_find as well. Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v2: split out from another patch v3: no changes in patch for this version of patchset v4: no chang

[PATCH v6 00/18] patches for FPGA

2017-11-15 Thread Alan Tull
Hi Greg, Please take these patches for FPGA that have been reviewed on the mailing list. They include some needed FPGA API changes plus bug fixes. They apply cleanly on next-20171113. Alan Alan Tull (18): fpga: bridge: support getting bridge from device fpga: mgr: API change to replace

[PATCH v6 01/18] fpga: bridge: support getting bridge from device

2017-11-15 Thread Alan Tull
. Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v2: use list_for_each_entry static the bridge_list_lock update copyright and author email v3: no change to this patch in this version of patchset v4: no change to this patch in

[PATCH v6 14/18] fpga: region: add fpga_region_class_find

2017-11-15 Thread Alan Tull
Add a function for searching the fpga-region class. This will be useful when device tree code is no longer in the same file that declares the fpga-region class. Another step in separating common FPGA region code from device tree support. Signed-off-by: Alan Tull <at...@kernel.org>

[PATCH v6 03/18] fpga: mgr: separate getting/locking FPGA manager

2017-11-15 Thread Alan Tull
: * fpga_mgr_lock * fpga_mgr_unlock The following functions no longer lock an FPGA manager's mutex: * of_fpga_mgr_get * fpga_mgr_get * fpga_mgr_put Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v2: add static for __fpga_mgr_get function d

[PATCH v6 02/18] fpga: mgr: API change to replace fpga load functions with single function

2017-11-15 Thread Alan Tull
. API documentation has been updated and a new document for FPGA region has been added. Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v2: add fpga_image_info_alloc/free update copyright and author email v3: fix bisectibility v4: fix

[PATCH v6 04/18] fpga: region: use dev_err instead of pr_err

2017-11-15 Thread Alan Tull
Use dev_err messages instead of pr_err. Also s/>dev/dev/ in two places where we already have dev = >dev. Signed-off-by: Alan Tull <at...@kernel.org> Acked-by: Moritz Fischer <m...@kernel.org> --- v2: new in this version of the patchset v3: for bisectability some changes moved

[PATCH 1/3] fpga: fpga-mgr: remove unnecessary code in __fpga_mgr_get

2017-11-15 Thread Alan Tull
tavo A. R. Silva <garsi...@embeddedor.com> Signed-off-by: Alan Tull <at...@kernel.org> --- drivers/fpga/fpga-mgr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c index 1fd5494..0b7664d 100644 --- a/drivers/fpga/fpga-mgr.c +++ b/drive

[PATCH 3/3] fpga: region: release of_parse_phandle nodes after use

2017-11-15 Thread Alan Tull
dfcc1f ("fpga: fpga-region: device tree control for FPGA") Cc: <sta...@vger.kernel.org> # 4.10+ Signed-off-by: Ian Abbott <abbo...@mev.co.uk> Signed-off-by: Alan Tull <at...@kernel.org> --- drivers/fpga/of-fpga-region.c | 13 ++--- 1 file changed, 10 inserti

[PATCH 2/3] fpga: fpga-bridge: remove unnecessary null check in of_fpga_bridge_get

2017-11-15 Thread Alan Tull
From: "Gustavo A. R. Silva" <garsi...@embeddedor.com> Notice that bridge = to_fpga_bridge(dev); expands to: bridge = container_of(dev, struct fpga_bridge, dev); and container_of is never null, so this null check is unnecessary. Addresses-Coverity-ID: 1397912 Report

[PATCH v2 0/5] fpga: don't use drvdata in common fpga code

2017-11-15 Thread Alan Tull
support patchset and this v2 patchset for convenience. Branch name is next-20171113-non-dt-support-v6+v2 Alan Alan Tull (5): fpga: region: don't use drvdata in common fpga code fpga: manager: don't use drvdata in common fpga code fpga: bridge: don't use drvdata in common fpga code fpga: region

[PATCH v2 5/5] fpga: region: return NOTIFY_STOP if overlay shoud be accepted

2017-11-15 Thread Alan Tull
("of: overlay: detect cases where device tree may become corrupt") Signed-off-by: Alan Tull <at...@kernel.org> --- v2: Added in v2 of this patchset. Tested on linux-next/master. --- drivers/fpga/of-fpga-region.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --gi

[PATCH v2 1/5] fpga: region: don't use drvdata in common fpga code

2017-11-15 Thread Alan Tull
. However PCIe based devices may have multiple FPGA mgr/bridge/regions under one PCIe device. Without these changes, the PCIe solution has to create an extra device for each child mgr/bridge/region to hold drvdata. Signed-off-by: Alan Tull <at...@kernel.org> Reported-by: Jiuyue Ma <majiu...@h

[PATCH 0/3] more patches for FPGA

2017-11-15 Thread Alan Tull
Hi Greg, Please take these three patches for FPGA. They go on top of my "[PATCH v6 00/18] patches for FPGA" patch set I sent earlier today. Sorry I didn't think of sending them all together at the time. These are fixes for FPGA that have been reviewed on the mailing list. I had to rebase the

[PATCH v2 3/5] fpga: bridge: don't use drvdata in common fpga code

2017-11-15 Thread Alan Tull
platform device. However PCIe based devices may have multiple FPGA mgr/bridge/regions under one pcie device. Without these changes, the PCIe solution has to create an extra device for each child mgr/bridge/region to hold drvdata. Signed-off-by: Alan Tull <at...@kernel.org> Reported-by: Jiu

[PATCH v2 4/5] fpga: region: change fpga_region_register to have one param

2017-11-15 Thread Alan Tull
-by: Alan Tull <at...@kernel.org> --- v2: This patch added in this version of the patchset --- Documentation/fpga/fpga-region.txt | 3 +-- drivers/fpga/fpga-region.c | 12 +--- drivers/fpga/of-fpga-region.c | 3 ++- include/linux/fpga/fpga-region.h | 4 +++- 4 files c

[PATCH v2 2/5] fpga: manager: don't use drvdata in common fpga code

2017-11-15 Thread Alan Tull
device. However PCIe based devices may have multiple FPGA mgr/bridge/regions under one pcie device. Without these changes, the PCIe solution has to create an extra device for each child mgr/bridge/region to hold drvdata. Signed-off-by: Alan Tull <at...@kernel.org> Reported-by: Jiuyue Ma

Re: [PATCH v5 00/18] Enable upper layers using FPGA region w/o device tree

2017-11-15 Thread Alan Tull
On Wed, Nov 15, 2017 at 9:53 AM, Moritz Fischer <m...@kernel.org> wrote: > On Tue, Oct 17, 2017 at 04:20:13PM -0500, Alan Tull wrote: >> * Change the fpga-mgr API to have one fpga_mgr_load function >> instead of three. >> >> * Separate common FPGA reg

[RFC 0/2] of: Add whitelist

2017-11-27 Thread Alan Tull
think other uses will need a way of having adding specific nodes from the base device tree, such as by adding a property like 'allow-overlay;' or 'allow-overlay = "okay";' If that is acceptable, I could use some advice on where that particular code should go. Alan Alan Tull (2): of: ov

[RFC 2/2] fpga: of region: add of-fpga-region to whitelist

2017-11-27 Thread Alan Tull
During each FPGA region's probe, add to whitelist. Remove during driver remove. Signed-off-by: Alan Tull <at...@kernel.org> --- drivers/fpga/of-fpga-region.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/fpga/of-fpga-region.c b/drivers/fpga/of-fpga-region.c index 7

[RFC 1/2] of: overlay: add whitelist

2017-11-27 Thread Alan Tull
with: void of_remove_whitelist_node(struct device_node *np) Signed-off-by: Alan Tull <at...@kernel.org> --- drivers/of/overlay.c | 73 include/linux/of.h | 12 + 2 files changed, 85 insertions(+) diff --git a/drivers/of/overlay.c b/d

Re: [PATCH v3 00/21] Intel FPGA Device Drivers

2017-11-27 Thread Alan Tull
On Mon, Nov 27, 2017 at 12:42 AM, Wu Hao <hao...@intel.com> wrote: > This patch series depends on the below patchset from Alan Tull. > [PATCH v2 0/5] fpga: don't use drvdata in common fpga code[1] > > [1] https://marc.info/?l=linux-fpga=151077942606263=2 Hi Hao, Thanks for ba

Re: [RFC 1/2] of: overlay: add whitelist

2017-11-28 Thread Alan Tull
On Tue, Nov 28, 2017 at 9:15 AM, Rob Herring <r...@kernel.org> wrote: > On Mon, Nov 27, 2017 at 02:58:03PM -0600, Alan Tull wrote: >> Add simple whitelist. When an overlay is submitted, if any target in >> the overlay is not in the whitelist, the overlay is rejected. Dr

Re: [RFC 0/2] of: Add whitelist

2017-11-29 Thread Alan Tull
On Wed, Nov 29, 2017 at 7:31 AM, Rob Herring <robh...@kernel.org> wrote: > On Wed, Nov 29, 2017 at 3:20 AM, Frank Rowand <frowand.l...@gmail.com> wrote: >> On 11/27/17 15:58, Alan Tull wrote: >>> Here's a proposal for a whitelist to lock down the dynamic devic

[PATCH 0/2] of: dynamic: restrict overlay by targets

2017-12-04 Thread Alan Tull
whitelist * Renamed the functions that enable a node * Added a DT property Alan Tull (2): of: overlay: add flag enabling overlays and enable fpga-region overlays of: dynamic: add overlay-allowed DT property drivers/fpga/of-fpga-region.c | 4 drivers/of/base.c | 4 ++-

Re: [PATCH v2 0/5] fpga: don't use drvdata in common fpga code

2017-12-04 Thread Alan Tull
On Wed, Nov 15, 2017 at 2:51 PM, Alan Tull <at...@kernel.org> wrote: Gentle reminder, this patch set is pretty straightforward, could use some reviewing. Alan > This patch set goes on top of v6 of the non-dt support patchset that has > been acked and I've asked Greg KH to s

Re: [PATCH v3 02/21] fpga: mgr: add region_id to fpga_image_info

2017-12-04 Thread Alan Tull
-mgr via >> fpga_image_info for fpga reconfiguration function. >> >> Signed-off-by: Wu Hao <hao...@intel.com> > Acked-by: Moritz Fischer <m...@kernel.org> Acked-by: Alan Tull <at...@kernel.org> >> >> v3: add one line comment for region_id &g

[PATCH 1/2] of: overlay: add flag enabling overlays and enable fpga-region overlays

2017-12-04 Thread Alan Tull
with: void of_node_overlay_enable(struct device_node *np) void of_node_overlay_disable(struct device_node *np) During each FPGA region's probe, enable its node for overlays. Signed-off-by: Alan Tull <at...@kernel.org> --- v1: (changes from the rfc) Add a flag instead of implementing

[PATCH 2/2] of: dynamic: add overlay-allowed DT property

2017-12-04 Thread Alan Tull
Allow DT nodes to be marked as valid targets for DT overlays by the added "overlay-allowed" property. Signed-off-by: Alan Tull <at...@kernel.org> --- drivers/of/base.c | 4 ++-- drivers/of/dynamic.c| 3 +++ drivers/of/fdt.c| 3 +++ drivers/of/of_private.h

Re: [PATCH v3 08/21] fpga: add Intel FPGA DFL PCIe device

2017-12-04 Thread Alan Tull
On Mon, Nov 27, 2017 at 9:15 PM, Wu Hao wrote: > On Mon, Nov 27, 2017 at 10:28:04AM +, David Laight wrote: >> From: Wu Hao >> > Sent: 27 November 2017 06:42 >> > From: Zhang Yi >> > >> > The Intel FPGA device appears as a PCIe device on the system.

Re: [PATCH v3 01/21] docs: fpga: add a document for Intel FPGA driver overview

2017-12-04 Thread Alan Tull
On Mon, Nov 27, 2017 at 12:42 AM, Wu Hao wrote: > Add a document for Intel FPGA driver overview. > > Signed-off-by: Enno Luebbers > Signed-off-by: Xiao Guangrong > Signed-off-by: Wu Hao > > v2:

Re: [PATCH v3 03/21] fpga: mgr: add status for fpga-manager

2017-12-04 Thread Alan Tull
On Mon, Nov 27, 2017 at 12:42 AM, Wu Hao wrote: Hi Hao, mgr->status isn't used anywhere except in status_show. So we don't need to add status to the fpga_manager struct. Also don't need the inline function to update it. Just read the status in status_show, if that ops

Re: [PATCH 2/2] of: dynamic: add overlay-allowed DT property

2017-12-04 Thread Alan Tull
On Mon, Dec 4, 2017 at 2:04 PM, Rob Herring <robh...@kernel.org> wrote: > On Mon, Dec 4, 2017 at 1:13 PM, Alan Tull <at...@kernel.org> wrote: >> Allow DT nodes to be marked as valid targets for DT >> overlays by the added "overlay-allowed" property. > &g

Re: [PATCH v2 1/5] fpga: region: don't use drvdata in common fpga code

2017-12-04 Thread Alan Tull
On Mon, Dec 4, 2017 at 3:32 PM, Moritz Fischer <m...@kernel.org> wrote: > On Wed, Nov 15, 2017 at 02:51:48PM -0600, Alan Tull wrote: >> Part of patchset that changes the following fpga_*_register >> functions to not set drvdata: >> * fpga_region_regis

Re: [PATCH v3 03/21] fpga: mgr: add status for fpga-manager

2017-12-12 Thread Alan Tull
On Mon, Nov 27, 2017 at 12:42 AM, Wu Hao wrote: > This patch adds status to fpga-manager data structure, to allow > driver to store full/partial reconfiguration errors and other > status information, and adds one status callback to fpga_manager_ops > to allow fpga_manager to

Re: [PATCH 2/3] fpga: manager: don't use drvdata in common fpga code

2017-11-13 Thread Alan Tull
On Tue, Oct 31, 2017 at 9:22 PM, Alan Tull <at...@kernel.org> wrote: Any further comments on v5? I'm getting ready to send v6. If I do it today, most of these patches will have no changes (again), the only changes will be in the patches that move drvdata out of the common code. I'v

Re: [PATCH v5 18/18] fpga: add attribute groups

2017-11-15 Thread Alan Tull
On Wed, Nov 15, 2017 at 9:46 AM, Moritz Fischer <m...@kernel.org> wrote: Hi Moritz, Thanks! Alan > On Tue, Oct 17, 2017 at 04:20:31PM -0500, Alan Tull wrote: >> Make it easy to add attributes to low level FPGA drivers the right >> way. Add attribute groups pointers to str

Re: [PATCH v3 09/21] fpga: intel-dfl-pci: add enumeration for feature devices

2017-12-07 Thread Alan Tull
On Mon, Nov 27, 2017 at 12:42 AM, Wu Hao wrote: > +/* enumerate feature devices under pci device */ > +static int cci_enumerate_feature_devs(struct pci_dev *pcidev) > +{ > + struct cci_drvdata *drvdata = pci_get_drvdata(pcidev); > + struct fpga_cdev *cdev; > +

Re: [RFC 0/2] of: Add whitelist

2017-12-05 Thread Alan Tull
On Thu, Nov 30, 2017 at 6:18 AM, Frank Rowand <frowand.l...@gmail.com> wrote: > On 11/29/17 08:31, Rob Herring wrote: >> On Wed, Nov 29, 2017 at 3:20 AM, Frank Rowand <frowand.l...@gmail.com> wrote: >>> On 11/27/17 15:58, Alan Tull wrote: >>>> Here

Re: [RFC 0/2] of: Add whitelist

2017-12-05 Thread Alan Tull
On Thu, Nov 30, 2017 at 6:46 AM, Frank Rowand <frowand.l...@gmail.com> wrote: > On 11/29/17 11:11, Alan Tull wrote: >> On Wed, Nov 29, 2017 at 7:31 AM, Rob Herring <robh...@kernel.org> wrote: >>> On Wed, Nov 29, 2017 at 3:20 AM, Frank Rowand <frowand.l...@gmail.com

Re: [PATCH 0/2] of: dynamic: restrict overlay by targets

2017-12-05 Thread Alan Tull
y mail server failed to deliver your answer to me). Can you > please answer that question so I can better understand this patch set is > needed for. Hi Frank, Sorry I missed those, I've replied to the original questions now. Alan > > Thanks, > > Frank > > > On 12/04/17

Re: [PATCH v3 08/21] fpga: add Intel FPGA DFL PCIe device

2017-12-05 Thread Alan Tull
On Mon, Dec 4, 2017 at 9:33 PM, Wu Hao <hao...@intel.com> wrote: > On Mon, Dec 04, 2017 at 01:46:59PM -0600, Alan Tull wrote: >> On Mon, Nov 27, 2017 at 9:15 PM, Wu Hao <hao...@intel.com> wrote: >> > On Mon, Nov 27, 2017 at 10:28:04AM +, David Laight wrote: >&

Re: [PATCH v2 5/5] fpga: region: return NOTIFY_STOP if overlay shoud be accepted

2017-12-08 Thread Alan Tull
On Thu, Dec 7, 2017 at 5:27 PM, Moritz Fischer <m...@kernel.org> wrote: > On Wed, Nov 15, 2017 at 02:51:52PM -0600, Alan Tull wrote: >> Recent changes to the Device Tree overlay notifier code have changed >> how notifier return codes are interpreted, requiring a NOT

[PATCH] patch for FPGA

2017-12-08 Thread Alan Tull
Hi Greg, Please take this one small fix for fpga. It's been reviewed on the mailing list. It applies cleanly on linux-next/master. Thanks, Alan Alexey Khoroshilov (1): fpga: socfpga-a10: disable clk on error in socfpga_a10_fpga_probe() drivers/fpga/socfpga-a10.c | 8 +++- 1 file

[PATCH] fpga: socfpga-a10: disable clk on error in socfpga_a10_fpga_probe()

2017-12-08 Thread Alan Tull
From: Alexey Khoroshilov <khoroshi...@ispras.ru> If fpga_mgr_register() fails, a clock is left undisabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> Reviewed-by: Moritz Fischer <m...@kernel.org> S

Re: [PATCH] fpga: socfpga-a10: disable clk on error in socfpga_a10_fpga_probe()

2017-12-04 Thread Alan Tull
ound by Linux Driver Verification project (linuxtesting.org). >> >> Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru> > Reviewed-by: Moritz Fischer <m...@kernel.org> Acked-by: Alan Tull <at...@kernel.org> >> --- >> drivers/fpga/socfpga-a10.c |

Re: [RFC 0/2] of: Add whitelist

2017-12-07 Thread Alan Tull
On Wed, Dec 6, 2017 at 5:56 AM, Frank Rowand <frowand.l...@gmail.com> wrote: > On 12/05/17 11:33, Alan Tull wrote: >> On Thu, Nov 30, 2017 at 6:46 AM, Frank Rowand <frowand.l...@gmail.com> wrote: >>> On 11/29/17 11:11, Alan Tull wrote: >>>> On Wed,

Re: [PATCH v3 08/21] fpga: add Intel FPGA DFL PCIe device

2017-12-06 Thread Alan Tull
On Wed, Dec 6, 2017 at 10:28 AM, David Laight <david.lai...@aculab.com> wrote: > From: Alan Tull >> Sent: 06 December 2017 15:30 >> On Wed, Dec 6, 2017 at 3:44 AM, David Laight <david.lai...@aculab.com> wrote: >> > From: Wu Hao >> >> Sent: 06 Dec

Re: [PATCH v3 08/21] fpga: add Intel FPGA DFL PCIe device

2017-12-06 Thread Alan Tull
On Wed, Dec 6, 2017 at 3:44 AM, David Laight wrote: > From: Wu Hao >> Sent: 06 December 2017 05:30 > ... >> > Regarding file names, it seems like the files added to drivers/fpga >> > could be uniformly named dfl-*.[ch]. Some are fpga-dfl-*.[ch] while >> > other are

Re: [PATCH] fpga: fpga-bridge: remove unnecessary null check in of_fpga_bridge_get

2017-10-30 Thread Alan Tull
ev, struct fpga_bridge, dev); >> >> and container_of is never null, so this null check is >> unnecessary. >> >> Addresses-Coverity-ID: 1397912 >> Reported-by: Alan Tull <at...@kernel.org> >> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.

Re: [PATCH 2/3] fpga: manager: don't use drvdata in common fpga code

2017-10-31 Thread Alan Tull
On Tue, Oct 31, 2017 at 3:59 PM, Moritz Fischer <m...@kernel.org> wrote: > On Tue, Oct 31, 2017 at 08:42:14PM +0000, Alan Tull wrote: >> Changes to the fpga manager code to not use drvdata in common >> code. >> >> Change fpga_mgr_register to not set or use d

[PATCH 1/3] fpga: region: don't use drvdata in common fpga code

2017-10-31 Thread Alan Tull
. However PCIe based devices may have multiple FPGA mgr/bridge/regions under one PCIe device. Without these changes, the PCIe solution has to create an extra device for each child mgr/bridge/region to hold drvdata. Signed-off-by: Alan Tull <at...@kernel.org> Reported-by: Jiuyue Ma <majiu...@h

[PATCH 2/3] fpga: manager: don't use drvdata in common fpga code

2017-10-31 Thread Alan Tull
, or region per platform device. However PCIe based devices may have multiple FPGA mgr/bridge/regions under one pcie device. Without these changes, the PCIe solution has to create an extra device for each child mgr/bridge/region to hold drvdata. Signed-off-by: Alan Tull <at...@kernel.org> Re

[PATCH 3/3] fpga: bridge: don't use drvdata in common fpga code

2017-10-31 Thread Alan Tull
manager, bridge, or region per platform device. However PCIe based devices may have multiple FPGA mgr/bridge/regions under one pcie device. Without these changes, the PCIe solution has to create an extra device for each child mgr/bridge/region to hold drvdata. Signed-off-by: Alan Tull

[PATCH 0/3] fpga: don't use drvdata in common fpga code

2017-10-31 Thread Alan Tull
set drvdata if desired. Alan Alan Tull (3): fpga: region: don't use drvdata in common fpga code fpga: manager: don't use drvdata in common fpga code fpga: bridge: don't use drvdata in common fpga code Documentation/fpga/fpga-mgr.txt | 23 --- drivers/fpga/altera

Re: [PATCH 3/3] fpga: bridge: don't use drvdata in common fpga code

2017-10-31 Thread Alan Tull
On Tue, Oct 31, 2017 at 3:42 PM, Alan Tull <at...@kernel.org> wrote: > Changes to the fpga bridge code to not use drvdata in common code. > > Change fpga_bridge_register to not set drvdata. > > Change the register/unregister functions parameters to take the >

Re: [PATCH 2/3] fpga: manager: don't use drvdata in common fpga code

2017-10-31 Thread Alan Tull
On Tue, Oct 31, 2017 at 8:34 PM, Moritz Fischer <m...@kernel.org> wrote: > On Tue, Oct 31, 2017 at 04:45:54PM -0500, Alan Tull wrote: >> On Tue, Oct 31, 2017 at 3:59 PM, Moritz Fischer <m...@kernel.org> wrote: >> > On Tue, Oct 31, 2017 at 08:42:14PM +,

Re: [PATCH v5 19/28] fpga: dfl: fme-mgr: add compat_id support

2018-05-07 Thread Alan Tull
d-off-by: Wu Hao <hao...@intel.com> Acked-by: Alan Tull <at...@kernel.org> > --- > drivers/fpga/dfl-fme-mgr.c | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/fpga/dfl-fme-mgr.c b/drivers/fpga/dfl-fme-mgr.c > index 1c5bc5a..afcdb39 100644 >

Re: [PATCH v5 22/28] fpga: dfl: fme-region: add support for compat_id

2018-05-07 Thread Alan Tull
On Tue, May 1, 2018 at 9:50 PM, Wu Hao <hao...@intel.com> wrote: Hi Hao, > This patch adds compat_id support, it reuses fme manager's > compat id, as the per region compat id is actually from the > fme manager's register. > > Signed-off-by: Wu Hao <hao...@intel.

Re: [PATCH v5 05/28] fpga: region: add compat_id support

2018-05-07 Thread Alan Tull
cations to read the per region compat_id for compatibility > checking before other actions on this fpga-region (e.g PR). > > Signed-off-by: Wu Hao <hao...@intel.com> Acked-by: Alan Tull <at...@kernel.org> > --- > v5: use pointer for compat_id as it's optional to implement

Re: [PATCH v5 04/28] fpga: mgr: add compat_id support

2018-05-07 Thread Alan Tull
mpat_id > could be used for compatibility checking before doing partial > reconfiguration to associated fpga regions. > > Signed-off-by: Wu Hao <hao...@intel.com> Acked-by: Alan Tull <at...@kernel.org> > --- > include/linux/fpga/fpga-mgr.h | 13 + >

Re: [PATCH 2/4] fpga: manager: change api, don't use drvdata

2018-04-27 Thread Alan Tull
On Fri, Apr 27, 2018 at 1:26 PM, Florian Fainelli <f.faine...@gmail.com> wrote: > On 04/26/2018 06:26 PM, Moritz Fischer wrote: >> From: Alan Tull <at...@kernel.org> >> >> Change fpga_mgr_register to not set or use drvdata. This supports >> the case where

Re: [PATCH 00/14] fpga api changes and kernel-doc fixup

2018-05-17 Thread Alan Tull
On Thu, May 17, 2018 at 2:04 AM, Greg Kroah-Hartman <gre...@linuxfoundation.org> wrote: > On Wed, May 16, 2018 at 06:49:53PM -0500, Alan Tull wrote: >> I'm posting these all together because they are interdependent. >> >> Patches 1-4 are a repost of v4 of the FPG

[PATCH 13/14] fpga: clarify that unregister functions also free

2018-05-16 Thread Alan Tull
The following functions also free the struct. Add that fact to the function documentation. - fpga_mgr_free - fpga_bridge_free - fpga_region_free Signed-off-by: Alan Tull <at...@kernel.org> --- drivers/fpga/fpga-bridge.c | 2 +- drivers/fpga/fpga-mgr.c| 2 +- drivers/fpga/fpga-re

[PATCH 04/14] fpga: region: change api, add fpga_region_create/free

2018-05-16 Thread Alan Tull
"region->dev.groups = groups;" after calling fpga_region_create. Update the drivers that call fpga_region_register with the new API. Signed-off-by: Alan Tull <at...@kernel.org> Signed-off-by: Moritz Fischer <m...@kernel.org> --- Documentation/fpga/fpga-region.txt |

[PATCH 00/14] fpga api changes and kernel-doc fixup

2018-05-16 Thread Alan Tull
. Patch 13 is a minor documentation fix Patch 14 updates MAINTAINERS for the new driver-api/fpga directory Alan Tull (14): fpga: region: don't use drvdata in common fpga code fpga: manager: change api, don't use drvdata fpga: bridge: change api, don't use drvdata fpga: region: change api

[PATCH 14/14] MAINTAINERS: Add driver-api/fpga path

2018-05-16 Thread Alan Tull
Add Documentation/driver-api/fpga path to MAINTAINERS file for fpga. Signed-off-by: Alan Tull <at...@kernel.org> --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9ce5062..febeecd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5612,6 +5612,

[PATCH 02/14] fpga: manager: change api, don't use drvdata

2018-05-16 Thread Alan Tull
); Update the drivers that call fpga_mgr_register with the new API. Signed-off-by: Alan Tull <at...@kernel.org> [Moritz: Fixup whitespace issue] Reported-by: Jiuyue Ma <majiu...@huawei.com> Signed-off-by: Moritz Fischer <m...@kernel.org> --- Documentation/fpga/

[PATCH 08/14] fpga: region: kernel-doc fixes

2018-05-16 Thread Alan Tull
Fix formatting and some cleanup for the kernel-doc documentation in fpga-region.c Signed-off-by: Alan Tull <at...@kernel.org> --- drivers/fpga/fpga-region.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/fpga/fpga-region.c b/drivers/fpga/fpga-region.c

[PATCH 01/14] fpga: region: don't use drvdata in common fpga code

2018-05-16 Thread Alan Tull
an extra device for each child region to hold drvdata. Signed-off-by: Alan Tull <at...@kernel.org> Reported-by: Jiuyue Ma <majiu...@huawei.com> Signed-off-by: Moritz Fischer <m...@kernel.org> --- drivers/fpga/fpga-region.c| 1 - drivers/fpga/of-fpga-region.c | 1 + 2 files changed,

[PATCH 05/14] fpga: use SPDX

2018-05-16 Thread Alan Tull
Replace GPLv2 boilerplate with SPDX in FPGA code that came from me or from Altera. Signed-off-by: Alan Tull <at...@kernel.org> --- drivers/fpga/altera-fpga2sdram.c | 13 + drivers/fpga/altera-freeze-bridge.c| 13 + drivers/fpga/altera-hps2fpga.c

[PATCH 06/14] fpga: mgr: kernel-doc fixes

2018-05-16 Thread Alan Tull
'flags' description in 'fpga_mgr_buf_load' Signed-off-by: Alan Tull <at...@kernel.org> --- drivers/fpga/fpga-mgr.c | 38 +- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c index 151ac36..5fffeef

[PATCH 07/14] fpga: bridge: kernel-doc fixes

2018-05-16 Thread Alan Tull
Fix the following warnings when documentation is built: ./drivers/fpga/fpga-bridge.c:143: warning: Function parameter or member 'info' not described in 'fpga_bridge_get' ./drivers/fpga/fpga-bridge.c:1: warning: no structured comments found Signed-off-by: Alan Tull <at...@kernel.

[PATCH 10/14] documentation: fpga: move fpga-mgr.txt to driver-api

2018-05-16 Thread Alan Tull
reference section to refer to kernel-doc documentation in fpga-mgr.c driver code rather than statically defining each function. Signed-off-by: Alan Tull <at...@kernel.org> --- Documentation/driver-api/fpga/fpga-mgr.rst | 220 + Documentation/driver-api/fpga/ind

[PATCH 09/14] Documentation: fpga: move fpga overview to driver-api

2018-05-16 Thread Alan Tull
that intro.rst will build cleanly and form a good introduction to the rest of the docs to be added. Signed-off-by: Alan Tull <at...@kernel.org> --- Documentation/driver-api/fpga/index.rst | 10 ++ Documentation/driver-api/fpga/intro.rst | 54 + Documentation/

[PATCH 03/14] fpga: bridge: change api, don't use drvdata

2018-05-16 Thread Alan Tull
fpga_bridge *br); Update the drivers that call fpga_bridge_register with the new API. Signed-off-by: Alan Tull <at...@kernel.org> Reported-by: Jiuyue Ma <majiu...@huawei.com> Signed-off-by: Moritz Fischer <m...@kernel.org> --- drivers/fpga/altera-fpga2sdram.c| 21 --- d

[PATCH 12/14] documentation: fpga: move fpga-region.txt to driver-api

2018-05-16 Thread Alan Tull
- Rewrite API reference section to refer to kernel-doc documentation in fpga-region.c driver code Signed-off-by: Alan Tull <at...@kernel.org> --- Documentation/driver-api/fpga/fpga-region.rst | 102 ++ Documentation/driver-api/fpga/index.rst | 1 + Documentatio

[PATCH 11/14] documentation: fpga: add bridge document to driver-api

2018-05-16 Thread Alan Tull
Add a new document to driver-api/fpga that documents the fpga bridge API and add it to driver-api/fpga/index.rst Signed-off-by: Alan Tull <at...@kernel.org> --- Documentation/driver-api/fpga/fpga-bridge.rst | 49 +++ Documentation/driver-api/fpga/index.rst |

Re: [PATCH v5 04/28] fpga: mgr: add compat_id support

2018-05-21 Thread Alan Tull
On Sun, May 20, 2018 at 10:03 PM, Wu Hao <hao...@intel.com> wrote: > On Mon, May 07, 2018 at 04:09:06PM -0500, Alan Tull wrote: >> On Tue, May 1, 2018 at 9:50 PM, Wu Hao <hao...@intel.com> wrote: >> >> Hi Hao, >> >> Looks good! >> >>

Re: [PATCH v5 20/28] fpga: dfl: add fpga bridge platform driver for FME

2018-05-23 Thread Alan Tull
On Wed, May 23, 2018 at 10:28 AM, Wu Hao <hao...@intel.com> wrote: > On Wed, May 23, 2018 at 10:15:00AM -0500, Alan Tull wrote: >> On Tue, May 1, 2018 at 9:50 PM, Wu Hao <hao...@intel.com> wrote: >> >> Hi Hao, >> >> > This patch adds fpga b

Re: [PATCH v5 20/28] fpga: dfl: add fpga bridge platform driver for FME

2018-05-24 Thread Alan Tull
On Wed, May 23, 2018 at 6:42 PM, Wu Hao <hao...@intel.com> wrote: > On Wed, May 23, 2018 at 04:06:17PM -0500, Alan Tull wrote: >> On Wed, May 23, 2018 at 10:28 AM, Wu Hao <hao...@intel.com> wrote: >> > On Wed, May 23, 2018 at 10:15:00AM -0500, Alan Tull wrote: >&g

Re: [PATCH v5 20/28] fpga: dfl: add fpga bridge platform driver for FME

2018-05-23 Thread Alan Tull
igned-off-by: Enno Luebbers <enno.luebb...@intel.com> > Signed-off-by: Shiva Rao <shiva@intel.com> > Signed-off-by: Christopher Rauer <christopher.ra...@intel.com> > Signed-off-by: Wu Hao <hao...@intel.com> > Acked-by: Alan Tull <at...@kernel.org> > Acke

Re: [PATCH v6 07/29] fpga: dfl: add chardev support for feature devices

2018-06-12 Thread Alan Tull
Rao > Signed-off-by: Christopher Rauer > Signed-off-by: Zhang Yi > Signed-off-by: Xiao Guangrong > Signed-off-by: Wu Hao Acked-by: Alan Tull > --- > v2: rebased > v3: move chardev support to fpga-dfl framework > v4: rebase, and add more comments in code. > v5: rebase

Re: [PATCH v6 03/29] fpga: mgr: add status for fpga-manager

2018-06-12 Thread Alan Tull
On Tue, Jun 12, 2018 at 5:10 AM, Wu Hao wrote: Hi Hao, > Documentation/ABI/testing/sysfs-class-fpga-manager | 24 +++ > drivers/fpga/fpga-mgr.c| 28 > ++ > include/linux/fpga/fpga-mgr.h | 9 +++ > 3

Re: [PATCH v6 06/29] fpga: add device feature list support

2018-06-12 Thread Alan Tull
t; Signed-off-by: Tim Whisonant > Signed-off-by: Enno Luebbers > Signed-off-by: Shiva Rao > Signed-off-by: Christopher Rauer > Signed-off-by: Zhang Yi > Signed-off-by: Xiao Guangrong > Signed-off-by: Wu Hao Acked-by: Alan Tull > --- > v3: split from another patch. > separat

Re: [PATCH v5 07/28] fpga: dfl: add chardev support for feature devices

2018-06-07 Thread Alan Tull
On Wed, Jun 6, 2018 at 7:24 AM, Wu Hao wrote: Hi Hao, One more... >> > +static dev_t dfl_get_devt(enum dfl_fpga_devt_type type, int id) >> > +{ >> > + WARN_ON(type >= DFL_FPGA_DEVT_MAX); >> > + >> > + return MKDEV(MAJOR(dfl_chrdevs[type].devt), id); >> > +} >> > + >> > +/** >> > +

Re: [RFC PATCH] of: overlay: update phandle cache on overlay apply and remove

2018-06-18 Thread Alan Tull
updated when modules are applied and removed. > This patch implements the cache updates. > > Fixes: 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of > of_find_node_by_phandle()") > Reported-by: Alan Tull > Suggested-by: Alan Tull > Signed-off-by: Frank Rowand T

Re: [PATCH v6 29/29] MAINTAINERS: add entry for FPGA DFL drivers

2018-06-12 Thread Alan Tull
On Tue, Jun 12, 2018 at 5:10 AM, Wu Hao wrote: > Add entry for FPGA Device Feature List (DFL) drivers. > > Signed-off-by: Wu Hao Acked-by: Alan Tull > --- > MAINTAINERS | 8 > 1 file changed, 8 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > in

<    1   2   3   4   5   6   7   8   9   10   >