mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
Move get_layout() from flashrom.c to layout.c
Change-Id: Ic67cf53abddc0aa905674acbcde717d9aed2f66e Signed-off-by: David Hendricks <david.hendricks@gmail.com> Reviewed-on: https://review.coreboot.org/21367 Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
af111e25a9
commit
beaefe0f96
@ -1529,14 +1529,6 @@ static int check_block_eraser(const struct flashctx *flash, int k, int log)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct flashrom_layout *get_layout(const struct flashctx *const flashctx)
|
|
||||||
{
|
|
||||||
if (flashctx->layout && flashctx->layout->num_entries)
|
|
||||||
return flashctx->layout;
|
|
||||||
else
|
|
||||||
return &flashctx->fallback_layout.base;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Reads the included layout regions into a buffer.
|
* @brief Reads the included layout regions into a buffer.
|
||||||
*
|
*
|
||||||
|
8
layout.c
8
layout.c
@ -40,6 +40,14 @@ struct flashrom_layout *get_global_layout(void)
|
|||||||
return &layout;
|
return &layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct flashrom_layout *get_layout(const struct flashrom_flashctx *const flashctx)
|
||||||
|
{
|
||||||
|
if (flashctx->layout && flashctx->layout->num_entries)
|
||||||
|
return flashctx->layout;
|
||||||
|
else
|
||||||
|
return &flashctx->fallback_layout.base;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef __LIBPAYLOAD__
|
#ifndef __LIBPAYLOAD__
|
||||||
int read_romlayout(const char *name)
|
int read_romlayout(const char *name)
|
||||||
{
|
{
|
||||||
|
2
layout.h
2
layout.h
@ -58,6 +58,8 @@ struct single_layout {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct flashrom_layout *get_global_layout(void);
|
struct flashrom_layout *get_global_layout(void);
|
||||||
|
struct flashrom_flashctx;
|
||||||
|
const struct flashrom_layout *get_layout(const struct flashrom_flashctx *const flashctx);
|
||||||
|
|
||||||
int process_include_args(struct flashrom_layout *);
|
int process_include_args(struct flashrom_layout *);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user