<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/dm/device.h, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>dm: Respect dma-ranges size</title>
<updated>2026-04-07T21:27:22+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2026-03-15T23:57:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a383c9689282269bb9687ec6c115de094c27fa67'/>
<id>a383c9689282269bb9687ec6c115de094c27fa67</id>
<content type='text'>
Rework dev_phys_to_bus() and dev_bus_to_phys() to respect the size
of the area specified in dma-ranges DT property. The area outside
of ranges is remapped 1:1, while the area in the ranges is remapped
according to the description in the dma-ranges property.

Adjust the test to test the area within the remapped range, not area
outside the remapped range, which was incorrect.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rework dev_phys_to_bus() and dev_bus_to_phys() to respect the size
of the area specified in dma-ranges DT property. The area outside
of ranges is remapped 1:1, while the area in the ranges is remapped
according to the description in the dma-ranges property.

Adjust the test to test the area within the remapped range, not area
outside the remapped range, which was incorrect.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Markus Schneider-Pargmann &lt;msp@baylibre.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: clarify DM_FLAG_PROBE_AFTER_BIND behaviour</title>
<updated>2025-03-30T15:09:04+00:00</updated>
<author>
<name>Caleb Connolly</name>
<email>caleb.connolly@linaro.org</email>
</author>
<published>2025-01-17T07:28:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8a0e6212bb5ef547712e922a41555eb7d1aee1ab'/>
<id>8a0e6212bb5ef547712e922a41555eb7d1aee1ab</id>
<content type='text'>
The DM_FLAG_PROBE_AFTER_BIND flag only makes sense on a per-device
basis, however recently added documentation as well as some confused
drivers imply that it might be added to a driver definition, this does
nothing.

Clarify the new documentation and expand on the comment by the
definition to point people in the right direction.

Signed-off-by: Caleb Connolly &lt;caleb.connolly@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DM_FLAG_PROBE_AFTER_BIND flag only makes sense on a per-device
basis, however recently added documentation as well as some confused
drivers imply that it might be added to a driver definition, this does
nothing.

Clarify the new documentation and expand on the comment by the
definition to point people in the right direction.

Signed-off-by: Caleb Connolly &lt;caleb.connolly@linaro.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Acked-by: Michal Simek &lt;michal.simek@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Tweak device_is_on_pci_bus() for code size</title>
<updated>2023-10-06T18:38:13+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-09-26T14:14:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=61fc132051740e0378a5e71f3db6cb1581e970fe'/>
<id>61fc132051740e0378a5e71f3db6cb1581e970fe</id>
<content type='text'>
This function cannot return true if PCI is not enabled, since no PCI
devices will have been bound. Add a check for this to reduce code size
where it is used.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function cannot return true if PCI is not enabled, since no PCI
devices will have been bound. Add a check for this to reduce code size
where it is used.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: Correct DM_FLAG_ comment</title>
<updated>2023-08-03T07:21:02+00:00</updated>
<author>
<name>Bin Meng</name>
<email>bmeng@tinylab.org</email>
</author>
<published>2023-07-31T14:01:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ef279f81ae813c9d0128490877227b75d1fd61a5'/>
<id>ef279f81ae813c9d0128490877227b75d1fd61a5</id>
<content type='text'>
The macros are prefixed with DM_FLAG_, not DM_FLAGS_.

Signed-off-by: Bin Meng &lt;bmeng@tinylab.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The macros are prefixed with DM_FLAG_, not DM_FLAGS_.

Signed-off-by: Bin Meng &lt;bmeng@tinylab.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: treewide: Complete migration to new driver model schema</title>
<updated>2023-02-14T16:43:27+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-02-13T15:56:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e316fbabbf1fe505162e35044c7924cbca0d73fd'/>
<id>e316fbabbf1fe505162e35044c7924cbca0d73fd</id>
<content type='text'>
Update various build and test components to use the new schema.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update various build and test components to use the new schema.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iommu: Add DMA mapping operations</title>
<updated>2023-01-27T19:47:57+00:00</updated>
<author>
<name>Mark Kettenis</name>
<email>kettenis@openbsd.org</email>
</author>
<published>2023-01-21T19:27:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dd6b68ed4f5bba78c0cd9765fa48b10cb1542dc7'/>
<id>dd6b68ed4f5bba78c0cd9765fa48b10cb1542dc7</id>
<content type='text'>
In order to support IOMMUs in non-bypass mode we need device ops
to map and unmap DMA memory.  The map operation enters a mapping
for a region specified by CPU address and size into the translation
table of the IOMMU and returns a DMA address suitable for
programming the device to do DMA.  The unmap operation removes
this mapping from the translation table of the IOMMU.

Signed-off-by: Mark Kettenis &lt;kettenis@openbsd.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to support IOMMUs in non-bypass mode we need device ops
to map and unmap DMA memory.  The map operation enters a mapping
for a region specified by CPU address and size into the translation
table of the IOMMU and returns a DMA address suitable for
programming the device to do DMA.  The unmap operation removes
this mapping from the translation table of the IOMMU.

Signed-off-by: Mark Kettenis &lt;kettenis@openbsd.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Reduce code size with dev_of_offset()</title>
<updated>2022-09-29T20:11:14+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-09-07T02:27:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1701359f752b9622752df6a6c6a1326c225a5616'/>
<id>1701359f752b9622752df6a6c6a1326c225a5616</id>
<content type='text'>
Update the function to mark it with the const attribute. Also avoid
calling it multiple times in the devfdt_get_addr_index() function.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the function to mark it with the const attribute. Also avoid
calling it multiple times in the devfdt_get_addr_index() function.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Support accessing core tags</title>
<updated>2022-06-28T02:09:52+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-05-08T10:39:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=930a3ddadebf3660cc3163081671de189300afdd'/>
<id>930a3ddadebf3660cc3163081671de189300afdd</id>
<content type='text'>
At present tag numbers are only allocated for non-core data, meaning that
the 'core' data, like priv and plat, are accessed through dedicated
functions.

For debugging and consistency it is convenient to use tags for this 'core'
data too. Add support for this, with new tag numbers and functions to
access the pointer and size for each.

Update one of the test drivers so that the uclass-private data can be
tested here.

There is some code duplication with functions like device_alloc_priv() but
this is not addressed for now. At some point, some rationalisation may
help to reduce code size, but more thought it needed on that.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At present tag numbers are only allocated for non-core data, meaning that
the 'core' data, like priv and plat, are accessed through dedicated
functions.

For debugging and consistency it is convenient to use tags for this 'core'
data too. Add support for this, with new tag numbers and functions to
access the pointer and size for each.

Update one of the test drivers so that the uclass-private data can be
tested here.

There is some code duplication with functions like device_alloc_priv() but
this is not addressed for now. At some point, some rationalisation may
help to reduce code size, but more thought it needed on that.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Add DM_FLAG_PROBE_AFTER_BIND flag</title>
<updated>2022-04-28T13:26:43+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2022-04-22T13:15:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9cc32bfa49d23a4d1bed9e6119255f2e78e20232'/>
<id>9cc32bfa49d23a4d1bed9e6119255f2e78e20232</id>
<content type='text'>
Introduce DM_FLAG_PROBE_AFTER_BIND flag, which can be set by driver or
uclass in .bind(), to indicate such driver instance should be probe()d
once binding of all devices is complete.

This is useful in case the driver determines that hardware initialization
is mandatory on boot, and such initialization happens only in probe().
This also solves the inability to call device_probe() from .bind().

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Cc: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Cc: Sean Anderson &lt;seanga2@gmail.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Steven Lawrance &lt;steven.lawrance@softathome.com&gt;
Reviewed-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Tested-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce DM_FLAG_PROBE_AFTER_BIND flag, which can be set by driver or
uclass in .bind(), to indicate such driver instance should be probe()d
once binding of all devices is complete.

This is useful in case the driver determines that hardware initialization
is mandatory on boot, and such initialization happens only in probe().
This also solves the inability to call device_probe() from .bind().

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Cc: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Cc: Sean Anderson &lt;seanga2@gmail.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Steven Lawrance &lt;steven.lawrance@softathome.com&gt;
Reviewed-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Tested-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: core: Allow finding a uclass device by partial name</title>
<updated>2022-04-25T14:00:03+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-04-25T05:31:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4e0710a2d007032c8a82ef3af45a0e6e9176a2a7'/>
<id>4e0710a2d007032c8a82ef3af45a0e6e9176a2a7</id>
<content type='text'>
In some cases two devices are related and the only way to tell is to
check that the names partially patch. Add a way to check this without
needing to create a new string for the comparison.

Fix the comment for device_find_child_by_namelen() while we are here.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases two devices are related and the only way to tell is to
check that the names partially patch. Add a way to check this without
needing to create a new string for the comparison.

Fix the comment for device_find_child_by_namelen() while we are here.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
