aboutsummaryrefslogtreecommitdiff
path: root/drivers/ddr/altera/sequencer.c
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2022-01-12 12:47:06 +0100
committerTom Rini <trini@konsulko.com>2022-02-11 11:29:23 -0500
commit07c79dd5fdeaefb39c9e7a97f3b66de63109a18d (patch)
tree31ea9ef06fec4c1e0108321bc51af40a4eaa8799 /drivers/ddr/altera/sequencer.c
parentf178f7c9550c4fd9c644f79a1eb2dafa5bcdce25 (diff)
fw_env: simplify logic & code paths in the fw_env_open()
Environment variables can be stored in two formats: 1. Single entry with header containing CRC32 2. Two entries with extra flags field in each entry header For that reason fw_env_open() has two main code paths and there are pointers for CRC32/flags/data. Previous implementation was a bit hard to follow: 1. It was checking for used format twice (in reversed order each time) 2. It was setting "environment" global struct fields to some temporary values that required extra comments explaining it This change simplifies that code: 1. It introduces two clear code paths 2. It sets "environment" global struct fields values only once it really knows them To be fair there are *two* crc32() calls now and an extra pointer variable but that should be cheap enough and worth it. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'drivers/ddr/altera/sequencer.c')
0 files changed, 0 insertions, 0 deletions