diff options
author | Lee Leahy <leroy.p.leahy@intel.com> | 2016-04-29 17:26:36 -0700 |
---|---|---|
committer | Leroy P Leahy <leroy.p.leahy@intel.com> | 2016-04-30 20:44:58 +0200 |
commit | efcee9fadd496945c55828c79dff8e0b19ae0053 (patch) | |
tree | a81656fa16c258bf001acc9b1c70966f53704492 /src/soc/intel/braswell | |
parent | 6bcbe5749b9f1a82004299bb63fba7e99b8ed358 (diff) | |
download | coreboot-efcee9fadd496945c55828c79dff8e0b19ae0053.tar.xz |
lib/reg_script: Allow multiple independent handlers
Remove the platform_bus_table routine and replace it with a link time
table. This allows the handlers to be spread across multiple modules
without any one module knowing about all of the handlers.
Establish number ranges for both the SOC and mainboard.
TEST=Build and run on Galileo Gen2
Change-Id: I0823d443d3352f31ba7fa20845bbf550b585c86f
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/14554
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/soc/intel/braswell')
-rw-r--r-- | src/soc/intel/braswell/iosf.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/soc/intel/braswell/iosf.c b/src/soc/intel/braswell/iosf.c index 98d1610ec3..9a267578f8 100644 --- a/src/soc/intel/braswell/iosf.c +++ b/src/soc/intel/braswell/iosf.c @@ -190,16 +190,10 @@ void reg_script_write_iosf(struct reg_script_context *ctx) } } -const struct reg_script_bus_entry reg_script_bus_table[] = { - {REG_SCRIPT_TYPE_IOSF, reg_script_read_iosf, reg_script_write_iosf} +static const struct reg_script_bus_entry reg_script_bus_table = { + REG_SCRIPT_TYPE_IOSF, reg_script_read_iosf, reg_script_write_iosf }; -const struct reg_script_bus_entry *platform_bus_table(size_t *table_entries) -{ - /* Return the table size and address */ - *table_entries = sizeof(reg_script_bus_table) - / sizeof(reg_script_bus_table[0]); - return ®_script_bus_table[0]; -} +REG_SCRIPT_BUS_ENTRY(reg_script_bus_table); #endif /* ENV_RAMSTAGE */ |