vendorcode/google: support multiple SAR filenames
Using a fixed filename only allows for one SAR configuration to be checked into CBFS. However, we have devices with shared firmware that would desire separate SAR configurations. This change allows boards to define a function to select one of multiple files stored in CBFS to be used. BUG=b:120958726 BRANCH=octopus TEST=build Signed-off-by: Justin TerAvest <teravest@chromium.org> Change-Id: Ib852aaaff39f1e9149fa43bf8dc25b2400737ea5 Reviewed-on: https://review.coreboot.org/c/30222 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
		
				
					committed by
					
						 Aaron Durbin
						Aaron Durbin
					
				
			
			
				
	
			
			
			
						parent
						
							c4d55e4397
						
					
				
				
					commit
					c650d6c5bb
				
			| @@ -54,4 +54,6 @@ struct wifi_sar_limits { | |||||||
|  */ |  */ | ||||||
| int get_wifi_sar_limits(struct wifi_sar_limits *sar_limits); | int get_wifi_sar_limits(struct wifi_sar_limits *sar_limits); | ||||||
|  |  | ||||||
|  | const char *get_wifi_sar_cbfs_filename(void); | ||||||
|  |  | ||||||
| #endif /* _SAR_H_ */ | #endif /* _SAR_H_ */ | ||||||
|   | |||||||
| @@ -26,7 +26,10 @@ | |||||||
|  |  | ||||||
| static int load_sar_file_from_cbfs(void *buf, size_t buffer_size) | static int load_sar_file_from_cbfs(void *buf, size_t buffer_size) | ||||||
| { | { | ||||||
| 	return cbfs_boot_load_file(WIFI_SAR_CBFS_FILENAME, buf, | 	const char *filename = get_wifi_sar_cbfs_filename(); | ||||||
|  | 	if (filename == NULL) | ||||||
|  | 		filename = WIFI_SAR_CBFS_FILENAME; | ||||||
|  | 	return cbfs_boot_load_file(filename, buf, | ||||||
| 			buffer_size, CBFS_TYPE_RAW); | 			buffer_size, CBFS_TYPE_RAW); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -120,3 +123,9 @@ int get_wifi_sar_limits(struct wifi_sar_limits *sar_limits) | |||||||
| 	memcpy(sar_limits, bin_buffer, bin_buff_adjusted_size); | 	memcpy(sar_limits, bin_buffer, bin_buff_adjusted_size); | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | __weak | ||||||
|  | const char *get_wifi_sar_cbfs_filename(void) | ||||||
|  | { | ||||||
|  | 	return NULL; | ||||||
|  | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user