From efcee9fadd496945c55828c79dff8e0b19ae0053 Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Fri, 29 Apr 2016 17:26:36 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/14554 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/soc/intel/braswell/iosf.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/soc') 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 */ -- cgit v1.2.3