<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/memory/ti-aemif.c, branch v7.0.10</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.10</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.10'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-12-09T19:38:27+00:00</updated>
<entry>
<title>memory: ti-aemif: Export aemif_*_cs_timings()</title>
<updated>2024-12-09T19:38:27+00:00</updated>
<author>
<name>Bastien Curutchet</name>
<email>bastien.curutchet@bootlin.com</email>
</author>
<published>2024-12-04T09:43:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=df8e78607d4795806b59564ba7a3e2e125d119fc'/>
<id>urn:sha1:df8e78607d4795806b59564ba7a3e2e125d119fc</id>
<content type='text'>
Export the aemif_set_cs_timing() and aemif_check_cs_timing() symbols so
they can be used by other drivers

Add a mutex to protect the CS configuration register from concurrent
accesses between the AEMIF and its 'children'.

Signed-off-by: Bastien Curutchet &lt;bastien.curutchet@bootlin.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20241204094319.1050826-7-bastien.curutchet@bootlin.com
[krzysztof: wrap aemif_set_cs_timings() at 80-char]
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
</content>
</entry>
<entry>
<title>memory: ti-aemif: Create aemif_set_cs_timings()</title>
<updated>2024-12-09T19:37:07+00:00</updated>
<author>
<name>Bastien Curutchet</name>
<email>bastien.curutchet@bootlin.com</email>
</author>
<published>2024-12-04T09:43:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a6d60e3376065752137ec23d103f7d039c363e41'/>
<id>urn:sha1:a6d60e3376065752137ec23d103f7d039c363e41</id>
<content type='text'>
Create an aemif_set_cs_timings() function to isolate the setting of a
chip select timing configuration and ease its exportation.

Signed-off-by: Bastien Curutchet &lt;bastien.curutchet@bootlin.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20241204094319.1050826-6-bastien.curutchet@bootlin.com
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
</content>
</entry>
<entry>
<title>memory: ti-aemif: Create aemif_check_cs_timings()</title>
<updated>2024-12-09T19:37:02+00:00</updated>
<author>
<name>Bastien Curutchet</name>
<email>bastien.curutchet@bootlin.com</email>
</author>
<published>2024-12-04T09:43:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c7b585d19cc1a7185a3a0b58cb643d28fd19cc1'/>
<id>urn:sha1:2c7b585d19cc1a7185a3a0b58cb643d28fd19cc1</id>
<content type='text'>
aemif_calc_rate() checks the validity of a new computed timing against a
'max' value given as input. This isn't convenient if we want to check
the CS timing configuration somewhere else in the code.

Wrap the verification of all the chip select's timing configuration into a
single function to ease its exportation in upcoming patches.
Remove the validity check from aemif_calc_rate(). Also remove the no
longer used 'max' input and change the return type to u32.
Remove the check of the aemif_calc_rate()'s return value during
device-tree parsing as aemif_calc_rate() can't fail anymore.

Signed-off-by: Bastien Curutchet &lt;bastien.curutchet@bootlin.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20241204094319.1050826-5-bastien.curutchet@bootlin.com
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
</content>
</entry>
<entry>
<title>memory: ti-aemif: Wrap CS timings into a struct</title>
<updated>2024-12-09T19:37:01+00:00</updated>
<author>
<name>Bastien Curutchet</name>
<email>bastien.curutchet@bootlin.com</email>
</author>
<published>2024-12-04T09:43:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=30b4da67655469bf8d4b8ba7c001096a1e10c7bf'/>
<id>urn:sha1:30b4da67655469bf8d4b8ba7c001096a1e10c7bf</id>
<content type='text'>
CS timings are store in the struct aemif_cs_data along with other CS
parameters. It isn't convenient for exposing CS timings to other drivers
without also exposing the other parameters.

Wrap the CS timings in a new struct aemif_cs_timings to simplify their
export in upcoming patches.

Signed-off-by: Bastien Curutchet &lt;bastien.curutchet@bootlin.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20241204094319.1050826-4-bastien.curutchet@bootlin.com
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
</content>
</entry>
<entry>
<title>memory: ti-aemif: Remove unnecessary local variables</title>
<updated>2024-12-09T19:36:54+00:00</updated>
<author>
<name>Bastien Curutchet</name>
<email>bastien.curutchet@bootlin.com</email>
</author>
<published>2024-12-04T09:43:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b3d57e179607106d5b08a635c49b338c409357d4'/>
<id>urn:sha1:b3d57e179607106d5b08a635c49b338c409357d4</id>
<content type='text'>
CS timings are copied to local variables that are then used as is,
without any modifications.

Remove these unneeded local variables and deal directly with the timings
stored in the struct aemif_cs_data.

Signed-off-by: Bastien Curutchet &lt;bastien.curutchet@bootlin.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20241204094319.1050826-3-bastien.curutchet@bootlin.com
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
</content>
</entry>
<entry>
<title>memory: ti-aemif: Store timings parameter in number of cycles - 1</title>
<updated>2024-12-09T19:34:36+00:00</updated>
<author>
<name>Bastien Curutchet</name>
<email>bastien.curutchet@bootlin.com</email>
</author>
<published>2024-12-04T09:43:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1ec0fa90070c9468d22b3c3ea5f4bd6c27810907'/>
<id>urn:sha1:1ec0fa90070c9468d22b3c3ea5f4bd6c27810907</id>
<content type='text'>
The CS configuration register expects timings to be expressed in
'number of cycles - 1' but they are stored in ns in the struct
aemif_cs_data. So at init, the timings currently set are converted to ns
by aemif_get_hw_params(), updated with values from the device-tree
properties, and then converted back to 'number of cycles - 1' before
being applied.

Store the timings directly in 'number of cycles - 1' instead of
nanoseconds.
Perform the conversion from nanosecond during the device-tree parsing.
Remove aemif_cycles_to_nsec() as it isn't used anymore.

Signed-off-by: Bastien Curutchet &lt;bastien.curutchet@bootlin.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20241204094319.1050826-2-bastien.curutchet@bootlin.com
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
</content>
</entry>
<entry>
<title>memory: ti-aemif: Revert "memory: ti-aemif: don't needlessly iterate over child nodes"</title>
<updated>2024-08-25T08:24:23+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2024-08-24T08:02:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c7d2f3fbdf59b206414ddc306b0fb74cd174c0ed'/>
<id>urn:sha1:c7d2f3fbdf59b206414ddc306b0fb74cd174c0ed</id>
<content type='text'>
This reverts commit 23a641d5c2bce4c723fff9118a5d865ee6b9d05a.

The first-level children of the aemif node are not the device nodes (ones
containing the 'compatible' property) but the chip-select nodes which
instead have their own children.

of_platform_populate() will skip such nodes so we must indeed iterate
over the direct children of the aemif node. The problem here is that we
never call of_platform_depopulate() as it takes the root device as
argument. We only have an unpopulated chip-select nodes so we will leak
these devices if any of the calls to of_platform_populate() fails.

I don't have a batter idea right now but my patch was not correct so we
need to revert it. While at it: at least use the scoped variant of the
OF node iterator. Down the line, we should find a better solution to fix
this potential resource leak in error path.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Link: https://lore.kernel.org/r/20240824080235.56472-1-brgl@bgdev.pl
Fixes: 23a641d5c2bc ("memory: ti-aemif: don't needlessly iterate over child nodes")
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
</content>
</entry>
<entry>
<title>memory: ti-aemif: simplify with scoped for each OF child loop</title>
<updated>2024-08-21T11:41:00+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2024-08-16T10:54:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5e8431f722d95bf58276a3051240c1ebe3cc238d'/>
<id>urn:sha1:5e8431f722d95bf58276a3051240c1ebe3cc238d</id>
<content type='text'>
Use scoped for_each_available_child_of_node_scoped() when iterating over
device nodes to make code a bit simpler.

Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-13-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
</content>
</entry>
<entry>
<title>memory: ti-aemif: simplify with dev_err_probe()</title>
<updated>2024-08-21T11:41:00+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2024-08-16T10:54:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=82986f5cdd23756e7e0c4fa9e4f590f7516772e9'/>
<id>urn:sha1:82986f5cdd23756e7e0c4fa9e4f590f7516772e9</id>
<content type='text'>
Use dev_err_probe() to avoid dmesg flood on actual defer.  This makes
the code also simpler.

Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-11-9eed0ee16b78@linaro.org
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
</content>
</entry>
<entry>
<title>memory: ti-aemif: don't needlessly iterate over child nodes</title>
<updated>2024-08-12T10:32:11+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2024-08-09T14:15:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=23a641d5c2bce4c723fff9118a5d865ee6b9d05a'/>
<id>urn:sha1:23a641d5c2bce4c723fff9118a5d865ee6b9d05a</id>
<content type='text'>
When populating devices from a specific node, we don't need to call
of_platform_populate() for every child node manually - the routine
will already do it. We can call it directly from the platform device's
OF node. While at it: use the managed variant of of_platform_populate().

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Link: https://lore.kernel.org/r/20240809-ti-aemif-v1-3-27b1e5001390@linaro.org
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
</content>
</entry>
</feed>
