aboutsummaryrefslogtreecommitdiff
path: root/boot/expo_build.c
diff options
context:
space:
mode:
authorSimon Glass2023-08-14 16:40:37 -0600
committerTom Rini2023-08-25 13:54:33 -0400
commiteb6c71b56282d3054dbffb83793e7d2c6745578e (patch)
tree0ad2e2b829a5afca3442eb2f58b09a6fb635b582 /boot/expo_build.c
parentbcf2b7202e960e7fb3df8d5e8ed0d6fa00a5a9fa (diff)
expo: cedit: Support writing settings to CMOS RAM
Add a command to write cedit settings to CMOS RAM so that it can be preserved across a reboot. This uses a simple bit-encoding, where each field has a 'bit position' and a 'bit length' in the schema. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/expo_build.c')
-rw-r--r--boot/expo_build.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/boot/expo_build.c b/boot/expo_build.c
index e8c4a40d3f0..bb33cc2a33f 100644
--- a/boot/expo_build.c
+++ b/boot/expo_build.c
@@ -294,7 +294,7 @@ static int obj_build(struct build_info *info, ofnode node, struct scene *scn)
{
struct scene_obj *obj;
const char *type;
- u32 id;
+ u32 id, val;
int ret;
log_debug("- object %s\n", ofnode_get_name(node));
@@ -313,6 +313,11 @@ static int obj_build(struct build_info *info, ofnode node, struct scene *scn)
if (ret)
return log_msg_ret("bld", ret);
+ if (!ofnode_read_u32(node, "start-bit", &val))
+ obj->start_bit = val;
+ if (!ofnode_read_u32(node, "bit-length", &val))
+ obj->bit_length = val;
+
return 0;
}