diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2014-09-30 09:23:22 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2014-09-30 11:10:48 +1000 |
commit | 4d5a57a73cbfa29ad2c8672f157294f733726f90 (patch) | |
tree | 471a0c52ebcbff86c1d3b3142db67fd67d6f648f /discover/platform-powerpc.c | |
parent | d88c7a99467e50bd9d2b57f0f7346904c45c6a11 (diff) | |
download | petitboot-4d5a57a73cbfa29ad2c8672f157294f733726f90.zip petitboot-4d5a57a73cbfa29ad2c8672f157294f733726f90.tar.gz |
discover/platform: Add finalise_config_hook
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Diffstat (limited to 'discover/platform-powerpc.c')
-rw-r--r-- | discover/platform-powerpc.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c index 1f6f725..7c34939 100644 --- a/discover/platform-powerpc.c +++ b/discover/platform-powerpc.c @@ -693,12 +693,8 @@ static void parse_opal_sysparams(struct config *config) if (!next_valid && !default_valid) return; - if (next_valid) { - /* invalidate next-boot-device setting */ - write_bootdev_sysparam("next-boot-device", 0xff); - } else { + if (!next_valid) next_bootdev = default_bootdev; - } switch (next_bootdev) { case IPMI_BOOTDEV_NONE: @@ -753,6 +749,12 @@ static int save_config(struct platform *p, struct config *config) return rc; } +static void finalise_config(struct platform *platform __attribute__((unused))) +{ + /* invalidate next-boot-device setting */ + write_bootdev_sysparam("next-boot-device", 0xff); +} + static int get_sysinfo(struct platform *p, struct system_info *sysinfo) { struct platform_powerpc *platform = p->platform_data; @@ -797,12 +799,13 @@ static bool probe(struct platform *p, void *ctx) static struct platform platform_powerpc = { - .name = "powerpc", - .dhcp_arch_id = 0x000e, - .probe = probe, - .load_config = load_config, - .save_config = save_config, - .get_sysinfo = get_sysinfo, + .name = "powerpc", + .dhcp_arch_id = 0x000e, + .probe = probe, + .load_config = load_config, + .save_config = save_config, + .finalise_config = finalise_config, + .get_sysinfo = get_sysinfo, }; register_platform(platform_powerpc); |