mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-22 20:58:22 +00:00
lmb: move MAX_LMB_REGIONS value in Kconfig
Move MAX_LMB_REGIONS value in Kconfig, the max number of the regions in lmb library. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
This commit is contained in:
parent
00fd8dad4d
commit
4fa0150d6c
3 changed files with 12 additions and 6 deletions
|
@ -12,8 +12,6 @@
|
||||||
* Copyright (C) 2001 Peter Bergner, IBM Corp.
|
* Copyright (C) 2001 Peter Bergner, IBM Corp.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MAX_LMB_REGIONS 8
|
|
||||||
|
|
||||||
struct lmb_property {
|
struct lmb_property {
|
||||||
phys_addr_t base;
|
phys_addr_t base;
|
||||||
phys_size_t size;
|
phys_size_t size;
|
||||||
|
@ -22,7 +20,7 @@ struct lmb_property {
|
||||||
struct lmb_region {
|
struct lmb_region {
|
||||||
unsigned long cnt;
|
unsigned long cnt;
|
||||||
unsigned long max;
|
unsigned long max;
|
||||||
struct lmb_property region[MAX_LMB_REGIONS+1];
|
struct lmb_property region[CONFIG_LMB_MAX_REGIONS + 1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct lmb {
|
struct lmb {
|
||||||
|
|
|
@ -707,6 +707,14 @@ config LMB
|
||||||
help
|
help
|
||||||
Support the library logical memory blocks.
|
Support the library logical memory blocks.
|
||||||
|
|
||||||
|
|
||||||
|
config LMB_MAX_REGIONS
|
||||||
|
int "Number of memory and reserved regions in lmb lib"
|
||||||
|
depends on LMB
|
||||||
|
default 8
|
||||||
|
help
|
||||||
|
Define the number of supported regions, memory and reserved, in the
|
||||||
|
library logical memory blocks.
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
config PHANDLE_CHECK_SEQ
|
config PHANDLE_CHECK_SEQ
|
||||||
|
|
|
@ -95,8 +95,8 @@ static void lmb_coalesce_regions(struct lmb_region *rgn, unsigned long r1,
|
||||||
|
|
||||||
void lmb_init(struct lmb *lmb)
|
void lmb_init(struct lmb *lmb)
|
||||||
{
|
{
|
||||||
lmb->memory.max = MAX_LMB_REGIONS;
|
lmb->memory.max = CONFIG_LMB_MAX_REGIONS;
|
||||||
lmb->reserved.max = MAX_LMB_REGIONS;
|
lmb->reserved.max = CONFIG_LMB_MAX_REGIONS;
|
||||||
|
|
||||||
lmb->memory.cnt = 0;
|
lmb->memory.cnt = 0;
|
||||||
lmb->reserved.cnt = 0;
|
lmb->reserved.cnt = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue