program loading: provide one cache maintenance callback

Instead of having 2 different functions to call when a program
is loaded provide a single callback with flags parameter. The
previous callbacks for cache management routines did this:

for_each_program_segment:
	arch_program_segment_loaded(start, size);
arch_program_loaded();

Now, use one callback instead:
for_each_program_segment:
	arch_segment_loaded(start, size, SEG_FINAL?);

Change-Id: I3811cba92e3355d172f605e4444f053321b07a2a
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/8838
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
diff --git a/src/lib/rmodule.c b/src/lib/rmodule.c
index c2bf33c..791029a 100644
--- a/src/lib/rmodule.c
+++ b/src/lib/rmodule.c
@@ -200,9 +200,8 @@
 		return -1;
 	rmodule_clear_bss(module);
 
-	arch_program_segment_loaded((uintptr_t)module->location,
-					rmodule_memory_size(module));
-	arch_program_loaded();
+	arch_segment_loaded((uintptr_t)module->location,
+				rmodule_memory_size(module), SEG_FINAL);
 
 	return 0;
 }