diff options
author | Sean Anderson <sean.anderson@seco.com> | 2022-08-30 16:54:39 -0400 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2022-09-06 09:28:45 +0800 |
commit | 96624d7b47530bb3e0009c01aa64d8e5279f95bd (patch) | |
tree | de02974fa2d130155c62fc525eb3ebd046ed4600 | |
parent | a8713c29b5037ab64837a4d122e02d6d8ff88062 (diff) | |
download | u-boot-96624d7b47530bb3e0009c01aa64d8e5279f95bd.zip u-boot-96624d7b47530bb3e0009c01aa64d8e5279f95bd.tar.gz u-boot-96624d7b47530bb3e0009c01aa64d8e5279f95bd.tar.bz2 |
ddr: fsl: Reduce the size of interactive options
The interactive mode uses large several tables of options which can be
configured. However, much of the contents of these tables are
repetetive. For example, no struct is larger than half a kilobyte, so
the offset only takes up 9 bits. Similarly, the size is only ever 4 or
8, and printhex is a boolean. Reduce the size of these fields. This
reduces the size of the options tables by around 10 KiB. However, the
largest contributor to the size of the options tables is the use of a
pointer for the strings. A better approach would be to use a separate
array of strings, and store an integer index in the options tables.
However, this would require a large re-architecting of this file.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r-- | drivers/ddr/fsl/interactive.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ddr/fsl/interactive.c b/drivers/ddr/fsl/interactive.c index 2f76beb..eb2f06e 100644 --- a/drivers/ddr/fsl/interactive.c +++ b/drivers/ddr/fsl/interactive.c @@ -27,9 +27,9 @@ /* Option parameter Structures */ struct options_string { const char *option_name; - size_t offset; - unsigned int size; - const char printhex; + u32 offset : 9; + u32 size : 4; + u32 printhex : 1; }; static unsigned int picos_to_mhz(unsigned int picos) |