<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/fpga, branch v5.10.230</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.10.230</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.10.230'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2024-06-16T11:32:19Z</updated>
<entry>
<title>fpga: region: add owner module and take its refcount</title>
<updated>2024-06-16T11:32:19Z</updated>
<author>
<name>Marco Pagani</name>
<email>marpagan@redhat.com</email>
</author>
<published>2024-04-19T08:35:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=26e6e25d742e29885cf44274fcf6b744366c4702'/>
<id>urn:sha1:26e6e25d742e29885cf44274fcf6b744366c4702</id>
<content type='text'>
[ Upstream commit b7c0e1ecee403a43abc89eb3e75672b01ff2ece9 ]

The current implementation of the fpga region assumes that the low-level
module registers a driver for the parent device and uses its owner pointer
to take the module's refcount. This approach is problematic since it can
lead to a null pointer dereference while attempting to get the region
during programming if the parent device does not have a driver.

To address this problem, add a module owner pointer to the fpga_region
struct and use it to take the module's refcount. Modify the functions for
registering a region to take an additional owner module parameter and
rename them to avoid conflicts. Use the old function names for helper
macros that automatically set the module that registers the region as the
owner. This ensures compatibility with existing low-level control modules
and reduces the chances of registering a region without setting the owner.

Also, update the documentation to keep it consistent with the new interface
for registering an fpga region.

Fixes: 0fa20cdfcc1f ("fpga: fpga-region: device tree control for FPGA")
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Suggested-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Reviewed-by: Russ Weight &lt;russ.weight@linux.dev&gt;
Signed-off-by: Marco Pagani &lt;marpagan@redhat.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20240419083601.77403-1-marpagan@redhat.com
Signed-off-by: Xu Yilun &lt;yilun.xu@linux.intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: region: Use standard dev_release for class driver</title>
<updated>2024-06-16T11:32:19Z</updated>
<author>
<name>Russ Weight</name>
<email>russell.h.weight@intel.com</email>
</author>
<published>2021-11-19T01:55:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=af02dec83a48cd8b32266bb4bea7a557be974d35'/>
<id>urn:sha1:af02dec83a48cd8b32266bb4bea7a557be974d35</id>
<content type='text'>
[ Upstream commit 8886a579744fbfa53e69aa453ed10ae3b1f9abac ]

The FPGA region class driver data structure is being treated as a
managed resource instead of using the standard dev_release call-back
function to release the class data structure. This change removes the
managed resource code and combines the create() and register()
functions into a single register() or register_full() function.

The register_full() function accepts an info data structure to provide
flexibility in passing optional parameters. The register() function
supports the current parameter list for users that don't require the
use of optional parameters.

Signed-off-by: Russ Weight &lt;russell.h.weight@intel.com&gt;
Reviewed-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Stable-dep-of: b7c0e1ecee40 ("fpga: region: add owner module and take its refcount")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>include: fpga: adi-axi-common.h: add version helper macros</title>
<updated>2020-04-19T15:56:21Z</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2020-03-24T13:46:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=20d5fa48d333670ffbc08d387a80710be91259a0'/>
<id>urn:sha1:20d5fa48d333670ffbc08d387a80710be91259a0</id>
<content type='text'>
The format for all ADI AXI IP cores is the same.
i.e. 'major.minor.patch'.

This patch adds the helper macros to be re-used in ADI AXI drivers.

Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>include: fpga: adi-axi-common.h: fixup whitespace tab -&gt; space</title>
<updated>2020-04-19T15:56:21Z</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2020-03-24T13:46:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=641dedd50c488739b56ef0f716988e646295dce4'/>
<id>urn:sha1:641dedd50c488739b56ef0f716988e646295dce4</id>
<content type='text'>
The initial version use a tab between '#define' &amp; 'ADI_AXI_REG_VERSION'.
This changes it to space. The change is purely cosmetic.

Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>fpga: altera-pr-ip: Make alt_pr_unregister function void</title>
<updated>2019-07-24T21:11:52Z</updated>
<author>
<name>Moritz Fischer</name>
<email>mdf@kernel.org</email>
</author>
<published>2019-06-27T00:33:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=71d8e94dabee7fceac473d87445a03e848469a71'/>
<id>urn:sha1:71d8e94dabee7fceac473d87445a03e848469a71</id>
<content type='text'>
Make alt_pr_unregister function void, since it always returns 0,
and nothing would act on the value anyways.

Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
</content>
</entry>
<entry>
<title>include: fpga: adi-axi-common.h: add common regs &amp; defs header</title>
<updated>2019-05-27T07:06:08Z</updated>
<author>
<name>Alexandru Ardelean</name>
<email>alexandru.ardelean@analog.com</email>
</author>
<published>2019-05-27T06:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d27ac2e02bf256d4e824e7c1e1e1afa2b96cefcc'/>
<id>urn:sha1:d27ac2e02bf256d4e824e7c1e1e1afa2b96cefcc</id>
<content type='text'>
The AXI HDL cores provided for Analog Devices reference designs all share
some common base registers (e.g. version register at address 0x00).

To reduce duplication for this, a common header is added to define these
registers as well as bitfields &amp; macros to work with these registers.

Signed-off-by: Alexandru Ardelean &lt;alexandru.ardelean@analog.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: add devm_fpga_region_create</title>
<updated>2018-10-16T09:13:50Z</updated>
<author>
<name>Alan Tull</name>
<email>atull@kernel.org</email>
</author>
<published>2018-10-15T22:20:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fea82b7f6670002ff36bf1bc77d0345b0b2f2d1c'/>
<id>urn:sha1:fea82b7f6670002ff36bf1bc77d0345b0b2f2d1c</id>
<content type='text'>
Add devm_fpga_region_create() which is the
managed version of fpga_region_create().

Change current region drivers to use
devm_fpga_region_create().

Signed-off-by: Alan Tull &lt;atull@kernel.org&gt;
Suggested-by: Federico Vaga &lt;federico.vaga@cern.ch&gt;
Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fpga: bridge: add devm_fpga_bridge_create</title>
<updated>2018-10-16T09:13:50Z</updated>
<author>
<name>Alan Tull</name>
<email>atull@kernel.org</email>
</author>
<published>2018-10-15T22:20:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=213befe049c70cfcfcbb4f6010bd5276dbc1f7b9'/>
<id>urn:sha1:213befe049c70cfcfcbb4f6010bd5276dbc1f7b9</id>
<content type='text'>
Add devm_fpga_bridge_create() which is the managed
version of fpga_bridge_create().

Change current bridge drivers to use
devm_fpga_bridge_create().

Signed-off-by: Alan Tull &lt;atull@kernel.org&gt;
Suggested-by: Federico Vaga &lt;federico.vaga@cern.ch&gt;
Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fpga: mgr: add devm_fpga_mgr_create</title>
<updated>2018-10-16T09:13:50Z</updated>
<author>
<name>Alan Tull</name>
<email>atull@kernel.org</email>
</author>
<published>2018-10-15T22:20:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=084181fe8cc7472695b907f0018f4cd00934cb12'/>
<id>urn:sha1:084181fe8cc7472695b907f0018f4cd00934cb12</id>
<content type='text'>
Add devm_fpga_mgr_create() which is the managed
version of fpga_mgr_create().

Change current FPGA manager drivers to use
devm_fpga_mgr_create()

Signed-off-by: Alan Tull &lt;atull@kernel.org&gt;
Suggested-by: Federico Vaga &lt;federico.vaga@cern.ch&gt;
Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>docs: fpga: document fpga manager flags</title>
<updated>2018-09-30T15:49:55Z</updated>
<author>
<name>Alan Tull</name>
<email>atull@kernel.org</email>
</author>
<published>2018-09-12T14:43:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=492ecf6d6598e7c3b0b1372653ed21da50ddfb09'/>
<id>urn:sha1:492ecf6d6598e7c3b0b1372653ed21da50ddfb09</id>
<content type='text'>
Add flags #defines to kerneldoc documentation in a
useful place.

Signed-off-by: Alan Tull &lt;atull@kernel.org&gt;
Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
