Merge "ipq5332: TINY NOR: remove unused crc libraries"

This commit is contained in:
Linux Build Service Account 2023-09-12 13:11:23 -07:00 committed by Gerrit - the friendly Code Review server
commit 743ea442d2
6 changed files with 37 additions and 3 deletions

View file

@ -289,7 +289,7 @@ static int abortboot(int bootdelay)
static void process_fdt_options(const void *blob)
{
#if defined(CONFIG_OF_CONTROL)
#if defined(CONFIG_OF_CONTROL) && !defined(CONFIG_REDUCE_FOOTPRINT)
ulong addr;
/* Add an env variable to point to a kernel payload, if available */
@ -324,7 +324,7 @@ const char *bootdelay_process(void)
s = getenv("bootdelay");
bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY;
#ifdef CONFIG_OF_CONTROL
#if defined(CONFIG_OF_CONTROL) && !defined(CONFIG_REDUCE_FOOTPRINT)
bootdelay = fdtdec_get_config_int(gd->fdt_blob, "bootdelay",
bootdelay);
#endif

View file

@ -466,7 +466,7 @@ static int initr_dataflash(void)
*/
static int should_load_env(void)
{
#ifdef CONFIG_OF_CONTROL
#if defined(CONFIG_OF_CONTROL) && !defined(CONFIG_REDUCE_FOOTPRINT)
return fdtdec_get_config_int(gd->fdt_blob, "load-environment", 1);
#elif defined CONFIG_DELAY_ENVIRONMENT
return 0;

View file

@ -743,6 +743,7 @@ const u32 *fdtdec_locate_array(const void *blob, int node,
*/
int fdtdec_get_bool(const void *blob, int node, const char *prop_name);
#ifndef CONFIG_REDUCE_FOOTPRINT
/**
* Look in the FDT for a config item with the given name and return its value
* as a 32-bit integer. The property must have at least 4 bytes of data. The
@ -755,6 +756,7 @@ int fdtdec_get_bool(const void *blob, int node, const char *prop_name);
*/
int fdtdec_get_config_int(const void *blob, const char *prop_name,
int default_val);
#endif
/**
* Look in the FDT for a config item with the given name
@ -766,6 +768,7 @@ int fdtdec_get_config_int(const void *blob, const char *prop_name,
*/
int fdtdec_get_config_bool(const void *blob, const char *prop_name);
#ifndef CONFIG_REDUCE_FOOTPRINT
/**
* Look in the FDT for a config item with the given name and return its value
* as a string.
@ -775,6 +778,7 @@ int fdtdec_get_config_bool(const void *blob, const char *prop_name);
* @returns property string, NULL on error.
*/
char *fdtdec_get_config_string(const void *blob, const char *prop_name);
#endif
/*
* Look up a property in a node and return its contents in a byte

View file

@ -21,9 +21,11 @@ obj-$(CONFIG_CMD_DHRYSTONE) += dhry/
obj-$(CONFIG_AES) += aes.o
obj-$(CONFIG_USB_TTY) += circbuf.o
ifndef CONFIG_REDUCE_FOOTPRINT
obj-y += crc7.o
obj-y += crc8.o
obj-y += crc16.o
endif
obj-$(CONFIG_ERRNO_STR) += errno_str.o
obj-$(CONFIG_FIT) += fdtdec_common.o
obj-$(CONFIG_$(SPL_)OF_CONTROL) += fdtdec_common.o

View file

@ -80,12 +80,14 @@ static const char * const compat_names[COMPAT_COUNT] = {
COMPAT(QCA_QUP_I2C, "qcom,qup-ip2c"),
};
#ifndef CONFIG_REDUCE_FOOTPRINT
const char *fdtdec_get_compatible(enum fdt_compat_id id)
{
/* We allow reading of the 'unknown' ID for testing purposes */
assert(id >= 0 && id < COMPAT_COUNT);
return compat_names[id];
}
#endif
fdt_addr_t fdtdec_get_addr_size_fixed(const void *blob, int node,
const char *prop_name, int index, int na, int ns,
@ -136,6 +138,7 @@ fdt_addr_t fdtdec_get_addr_size_fixed(const void *blob, int node,
return addr;
}
#ifndef CONFIG_REDUCE_FOOTPRINT
fdt_addr_t fdtdec_get_addr_size_auto_parent(const void *blob, int parent,
int node, const char *prop_name, int index, fdt_size_t *sizep)
{
@ -177,6 +180,7 @@ fdt_addr_t fdtdec_get_addr_size_auto_noparent(const void *blob, int node,
return fdtdec_get_addr_size_auto_parent(blob, parent, node, prop_name,
index, sizep);
}
#endif
fdt_addr_t fdtdec_get_addr_size(const void *blob, int node,
const char *prop_name, fdt_size_t *sizep)
@ -188,6 +192,7 @@ fdt_addr_t fdtdec_get_addr_size(const void *blob, int node,
ns, sizep);
}
#ifndef CONFIG_REDUCE_FOOTPRINT
fdt_addr_t fdtdec_get_addr(const void *blob, int node,
const char *prop_name)
{
@ -351,6 +356,7 @@ int fdtdec_get_pci_bar32(const void *blob, int node,
return 0;
}
#endif
#endif
uint64_t fdtdec_get_uint64(const void *blob, int node, const char *prop_name,
uint64_t default_val)
@ -382,6 +388,7 @@ int fdtdec_get_is_enabled(const void *blob, int node)
return 1;
}
#ifndef CONFIG_REDUCE_FOOTPRINT
enum fdt_compat_id fdtdec_lookup(const void *blob, int node)
{
enum fdt_compat_id id;
@ -393,6 +400,7 @@ enum fdt_compat_id fdtdec_lookup(const void *blob, int node)
return id;
return COMPAT_UNKNOWN;
}
#endif
int fdtdec_next_compatible(const void *blob, int node,
enum fdt_compat_id id)
@ -400,6 +408,7 @@ int fdtdec_next_compatible(const void *blob, int node,
return fdt_node_offset_by_compatible(blob, node, compat_names[id]);
}
#ifndef CONFIG_REDUCE_FOOTPRINT
int fdtdec_next_compatible_subnode(const void *blob, int node,
enum fdt_compat_id id, int *depthp)
{
@ -559,6 +568,7 @@ int fdtdec_add_aliases_for_id(const void *blob, const char *name,
return num_found;
}
#endif
int fdtdec_get_alias_seq(const void *blob, const char *base, int offset,
int *seqp)
@ -622,6 +632,7 @@ int fdtdec_get_chosen_node(const void *blob, const char *name)
return fdt_path_offset(blob, prop);
}
#ifndef CONFIG_REDUCE_FOOTPRINT
int fdtdec_check_fdt(void)
{
/*
@ -633,6 +644,7 @@ int fdtdec_check_fdt(void)
assert(!fdtdec_prepare_fdt());
return 0;
}
#endif
/*
* This function is a little odd in that it accesses global data. At some
@ -660,6 +672,7 @@ int fdtdec_prepare_fdt(void)
return 0;
}
#ifndef CONFIG_REDUCE_FOOTPRINT
int fdtdec_lookup_phandle(const void *blob, int node, const char *prop_name)
{
const u32 *phandle;
@ -673,6 +686,7 @@ int fdtdec_lookup_phandle(const void *blob, int node, const char *prop_name)
lookup = fdt_node_offset_by_phandle(blob, fdt32_to_cpu(*phandle));
return lookup;
}
#endif
/**
* Look up a property in a node and check that it has a minimum length.
@ -718,6 +732,7 @@ int fdtdec_get_int_array(const void *blob, int node, const char *prop_name,
return err;
}
#ifndef CONFIG_REDUCE_FOOTPRINT
int fdtdec_get_int_array_count(const void *blob, int node,
const char *prop_name, u32 *array, int count)
{
@ -1004,6 +1019,7 @@ int fdtdec_read_fmap_entry(const void *blob, int node, const char *name,
return 0;
}
#endif
u64 fdtdec_get_number(const fdt32_t *ptr, unsigned int cells)
{
@ -1015,6 +1031,7 @@ u64 fdtdec_get_number(const fdt32_t *ptr, unsigned int cells)
return number;
}
#ifndef CONFIG_REDUCE_FOOTPRINT
int fdt_get_resource(const void *fdt, int node, const char *property,
unsigned int index, struct fdt_resource *res)
{
@ -1214,6 +1231,7 @@ int fdtdec_decode_display_timing(const void *blob, int parent, int index,
return 0;
}
#endif
#ifdef CONFIG_OF_COMBINE

View file

@ -299,6 +299,7 @@ const void *fdt_getprop(const void *fdt, int nodeoffset,
return fdt_getprop_namelen(fdt, nodeoffset, name, strlen(name), lenp);
}
#ifndef CONFIG_REDUCE_FOOTPRINT
uint32_t fdt_get_phandle(const void *fdt, int nodeoffset)
{
const fdt32_t *php;
@ -315,6 +316,7 @@ uint32_t fdt_get_phandle(const void *fdt, int nodeoffset)
return fdt32_to_cpu(*php);
}
#endif
const char *fdt_get_alias_namelen(const void *fdt,
const char *name, int namelen)
@ -328,6 +330,7 @@ const char *fdt_get_alias_namelen(const void *fdt,
return fdt_getprop_namelen(fdt, aliasoffset, name, namelen, NULL);
}
#ifndef CONFIG_REDUCE_FOOTPRINT
const char *fdt_get_alias(const void *fdt, const char *name)
{
return fdt_get_alias_namelen(fdt, name, strlen(name));
@ -384,6 +387,7 @@ int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen)
return offset; /* error from fdt_next_node() */
}
#endif
int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
int supernodedepth, int *nodedepth)
@ -442,6 +446,7 @@ int fdt_parent_offset(const void *fdt, int nodeoffset)
nodedepth - 1, NULL);
}
#ifndef CONFIG_REDUCE_FOOTPRINT
int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
const char *propname,
const void *propval, int proplen)
@ -493,6 +498,7 @@ int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle)
return offset; /* error from fdt_next_node() */
}
#endif
int fdt_stringlist_contains(const char *strlist, int listlen, const char *str)
{
@ -531,6 +537,7 @@ int fdt_count_strings(const void *fdt, int node, const char *property)
return count;
}
#ifndef CONFIG_REDUCE_FOOTPRINT
int fdt_find_string(const void *fdt, int node, const char *property,
const char *string)
{
@ -556,6 +563,7 @@ int fdt_find_string(const void *fdt, int node, const char *property,
return -FDT_ERR_NOTFOUND;
}
#endif
int fdt_get_string_index(const void *fdt, int node, const char *property,
int index, const char **output)
@ -581,11 +589,13 @@ int fdt_get_string_index(const void *fdt, int node, const char *property,
return -FDT_ERR_NOTFOUND;
}
#ifndef CONFIG_REDUCE_FOOTPRINT
int fdt_get_string(const void *fdt, int node, const char *property,
const char **output)
{
return fdt_get_string_index(fdt, node, property, 0, output);
}
#endif
int fdt_node_check_compatible(const void *fdt, int nodeoffset,
const char *compatible)