fdt: Avoid exporting fdtdec_prepare_fdt()
This function is not used outside this file. Make it static. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
0c16fca927
commit
c662d0b722
|
|
@ -554,15 +554,6 @@ uint64_t fdtdec_get_uint64(const void *blob, int node, const char *prop_name,
|
||||||
*/
|
*/
|
||||||
int fdtdec_get_is_enabled(const void *blob, int node);
|
int fdtdec_get_is_enabled(const void *blob, int node);
|
||||||
|
|
||||||
/**
|
|
||||||
* Make sure we have a valid fdt available to control U-Boot.
|
|
||||||
*
|
|
||||||
* If not, a message is printed to the console if the console is ready.
|
|
||||||
*
|
|
||||||
* Return: 0 if all ok, -1 if not
|
|
||||||
*/
|
|
||||||
int fdtdec_prepare_fdt(void);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks that we have a valid fdt available to control U-Boot.
|
* Checks that we have a valid fdt available to control U-Boot.
|
||||||
|
|
||||||
|
|
|
||||||
26
lib/fdtdec.c
26
lib/fdtdec.c
|
|
@ -586,24 +586,12 @@ int fdtdec_get_chosen_node(const void *blob, const char *name)
|
||||||
return fdt_path_offset(blob, prop);
|
return fdt_path_offset(blob, prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
int fdtdec_check_fdt(void)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* We must have an FDT, but we cannot panic() yet since the console
|
|
||||||
* is not ready. So for now, just assert(). Boards which need an early
|
|
||||||
* FDT (prior to console ready) will need to make their own
|
|
||||||
* arrangements and do their own checks.
|
|
||||||
*/
|
|
||||||
assert(!fdtdec_prepare_fdt());
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This function is a little odd in that it accesses global data. At some
|
* This function is a little odd in that it accesses global data. At some
|
||||||
* point if the architecture board.c files merge this will make more sense.
|
* point if the architecture board.c files merge this will make more sense.
|
||||||
* Even now, it is common code.
|
* Even now, it is common code.
|
||||||
*/
|
*/
|
||||||
int fdtdec_prepare_fdt(void)
|
static int fdtdec_prepare_fdt(void)
|
||||||
{
|
{
|
||||||
if (!gd->fdt_blob || ((uintptr_t)gd->fdt_blob & 3) ||
|
if (!gd->fdt_blob || ((uintptr_t)gd->fdt_blob & 3) ||
|
||||||
fdt_check_header(gd->fdt_blob)) {
|
fdt_check_header(gd->fdt_blob)) {
|
||||||
|
|
@ -625,6 +613,18 @@ int fdtdec_prepare_fdt(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int fdtdec_check_fdt(void)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* We must have an FDT, but we cannot panic() yet since the console
|
||||||
|
* is not ready. So for now, just assert(). Boards which need an early
|
||||||
|
* FDT (prior to console ready) will need to make their own
|
||||||
|
* arrangements and do their own checks.
|
||||||
|
*/
|
||||||
|
assert(!fdtdec_prepare_fdt());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int fdtdec_lookup_phandle(const void *blob, int node, const char *prop_name)
|
int fdtdec_lookup_phandle(const void *blob, int node, const char *prop_name)
|
||||||
{
|
{
|
||||||
const u32 *phandle;
|
const u32 *phandle;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue