<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/lmb.h, branch v2023.07.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/include/lmb.h?h=v2023.07.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/include/lmb.h?h=v2023.07.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2023-04-06T19:08:46Z</updated>
<entry>
<title>lmb: Fix LMB_MEMORY_REGIONS flag usage</title>
<updated>2023-04-06T19:08:46Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2023-03-22T18:12:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=94c8da21216ac077842c413a4339e71285bcf94d'/>
<id>urn:sha1:94c8da21216ac077842c413a4339e71285bcf94d</id>
<content type='text'>
Remove test on CONFIG_LMB_MEMORY_REGIONS introduced by commit
7c1860fce4e3 ("lmb: Fix lmb property's defination under struct lmb").

This code in lmb_init() is strange, because if CONFIG_LMB_USE_MAX_REGIONS
and CONFIG_LMB_MEMORY_REGIONS are not defined, the implicit #else is empty
and the required initialization is not done:
lmb-&gt;memory.max = ?
lmb-&gt;reserved.max = ?

But this setting is not possible:
- CONFIG_LMB_USE_MAX_REGIONS not defined
- CONFIG_LMB_MEMORY_REGIONS not defined
because CONFIG_LMB_MEMORY_REGIONS and CONFIG_LMB_RESERVED_REGIONS are
defined as soon as the CONFIG_LMB_USE_MAX_REGIONS is not defined.

This patch removes this impossible case #elif and I add some
explanation in lmb.h to explain why in the struct lmb {} the lmb
property is defined if CONFIG_LMB_MEMORY_REGIONS is NOT defined.

This patch also removes CONFIG_LMB_XXX dependency on CONFIG_LMB as these
defines are used in API file lmb.h and not only in library file.

Fixes: 5e2548c1d6e03 ("lmb: Fix LMB_MEMORY_REGIONS flag usage")
Reported-by: Mark Millard &lt;marklmi@yahoo.com&gt;
Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Acked-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
</entry>
<entry>
<title>lmb: Fix LMB_MEMORY_REGIONS flag usage</title>
<updated>2022-08-10T17:38:30Z</updated>
<author>
<name>Patrice Chotard</name>
<email>patrice.chotard@foss.st.com</email>
</author>
<published>2022-08-02T08:21:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5e2548c1d6e0331edbf94edcfc95d55b5e9a6cab'/>
<id>urn:sha1:5e2548c1d6e0331edbf94edcfc95d55b5e9a6cab</id>
<content type='text'>
This patch is fixing a broken boot observed on stm32mp157c-dk2 board.

IS_ENABLED macro should be used to check if a compilation flag is set
to "y" or "m".
LMB_MEMORY_REGIONS is set to a numerical value, IS_ENABLED macro is not
suitable in this case.

Fixes: 7c1860fce4e3 ("lmb: Fix lmb property's defination under struct lmb")
Signed-off-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Acked-by: Michal Simek &lt;michal.simek@amd.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>lmb: Fix lmb property's defination under struct lmb</title>
<updated>2022-07-26T06:23:54Z</updated>
<author>
<name>Ashok Reddy Soma</name>
<email>ashok.reddy.soma@xilinx.com</email>
</author>
<published>2022-07-07T08:45:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7c1860fce4e369bdcabc1f574feb6b9af19999a3'/>
<id>urn:sha1:7c1860fce4e369bdcabc1f574feb6b9af19999a3</id>
<content type='text'>
Under struct lmb {} the lmb property's should be defined only if
CONFIG_LMB_MEMORY_REGIONS is defined.

Signed-off-by: Ashok Reddy Soma &lt;ashok.reddy.soma@xilinx.com&gt;
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;

Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
Link: https://lore.kernel.org/r/c24a2b1d6f5db4eb65393f6a77fae129b30b6233.1657183534.git.michal.simek@amd.com
</content>
</entry>
<entry>
<title>lmb: drop unused lmb_size_bytes()</title>
<updated>2021-11-20T09:53:00Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-11-14T08:03:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7db07aa24fa869bfa0e56709ffaa992051075942'/>
<id>urn:sha1:7db07aa24fa869bfa0e56709ffaa992051075942</id>
<content type='text'>
lmb_size_bytes() is unused.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>lmb: remove extern keyword in lmb.h</title>
<updated>2021-11-20T09:53:00Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-11-14T07:52:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=951a8c487120b7f0a4badecb9402d7eaaad8dbfb'/>
<id>urn:sha1:951a8c487120b7f0a4badecb9402d7eaaad8dbfb</id>
<content type='text'>
The extern keyword is not needed in include/lmb.h to declare functions.
Remove it.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>doc: add include/lmb.h to the HTML documentation</title>
<updated>2021-11-20T09:53:00Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-11-14T07:43:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4ad4c2daeb44a1761e944e819213ceb3c3bd1340'/>
<id>urn:sha1:4ad4c2daeb44a1761e944e819213ceb3c3bd1340</id>
<content type='text'>
Correct Sphinx style comments in include/lmb.h

Add the logical memory block API to the HTML documentation.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>lmb: remove lmb_is_nomap() from include</title>
<updated>2021-11-20T09:53:00Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2021-11-14T07:41:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5a515132d9f25b1ff2c15e2013de9be33bf71067'/>
<id>urn:sha1:5a515132d9f25b1ff2c15e2013de9be33bf71067</id>
<content type='text'>
Defining static functions in includes should be avoided.
Function lmb_is_nomap() is only used in the unit test.
So move it to the unit test.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>lmb: Add generic arch_lmb_reserve_generic()</title>
<updated>2021-09-23T18:15:32Z</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut@gmail.com</email>
</author>
<published>2021-09-10T20:47:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1274698d13ce1dfd00275b821b512e17cdc88d98'/>
<id>urn:sha1:1274698d13ce1dfd00275b821b512e17cdc88d98</id>
<content type='text'>
The arc/arm/m68k/microblaze/mips/ppc arch_lmb_reserve() implementations
are all mostly the same, except for a couple of details. Implement a
generic arch_lmb_reserve_generic() function which can be parametrized
enough to cater for those differences between architectures. This can
also be parametrized enough so it can handle cases where U-Boot is not
relocated to the end of DRAM e.g. because there is some other reserved
memory past U-Boot (e.g. unmovable firmware for coprocessor), it is not
relocated at all, and other such use cases.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@gmail.com&gt;
Cc: Alexey Brodkin &lt;alexey.brodkin@synopsys.com&gt;
Cc: Angelo Dureghello &lt;angelo@sysam.it&gt;
Cc: Daniel Schwierzeck &lt;daniel.schwierzeck@gmail.com&gt;
Cc: Eugeniy Paltsev &lt;Eugeniy.Paltsev@synopsys.com&gt;
Cc: Hai Pham &lt;hai.pham.ud@renesas.com&gt;
Cc: Michal Simek &lt;monstr@monstr.eu&gt;
Cc: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>lmb: add lmb_is_reserved_flags</title>
<updated>2021-06-07T14:48:40Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2021-05-07T12:50:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e359a4a5c1f01add83b8f39f5da0c61ce51e918a'/>
<id>urn:sha1:e359a4a5c1f01add83b8f39f5da0c61ce51e918a</id>
<content type='text'>
Add a new function lmb_is_reserved_flags to check if
an address is reserved with a specific flags.

This function can be used to check if an address was
reserved with no-map flags with:

lmb_is_reserved_flags(lmb, addr, LMB_NOMAP);

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
</entry>
<entry>
<title>lmb: Add support of flags for no-map properties</title>
<updated>2021-06-07T14:48:40Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2021-05-07T12:50:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=59c0ea5df33fc4d9b62226d29e3b5c61d639303f'/>
<id>urn:sha1:59c0ea5df33fc4d9b62226d29e3b5c61d639303f</id>
<content type='text'>
Add "flags" in lmb_property to save the "no-map" property of
reserved region and a new function lmb_reserve_flags() to check
this flag.

The default allocation use flags = LMB_NONE.

The adjacent reserved memory region are merged only when they have
the same flags value.

This patch is partially based on flags support done in Linux kernel
mm/memblock .c (previously lmb.c); it is why LMB_NOMAP = 0x4, it is
aligned with MEMBLOCK_NOMAP value.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
</feed>
