Skip to content

Commit 623d235

Browse files
committed
bootloader: use ceiling_fraction() instead of open-coding it
Use the existing ceiling_fraction() function instead of open- coding it. Signed-off-by: Guennadi Liakhovetski <[email protected]>
1 parent 692d3dd commit 623d235

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

soc/xtensa/intel_adsp/common/bootloader/boot_loader.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,7 @@ static uint32_t hp_sram_power_on_memory(uint32_t memory_size)
252252
/* calculate total number of used SRAM banks (EBB)
253253
* to power up only necessary banks
254254
*/
255-
ebb_in_use = (!(memory_size % SRAM_BANK_SIZE)) ?
256-
(memory_size / SRAM_BANK_SIZE) :
257-
(memory_size / SRAM_BANK_SIZE) + 1;
255+
ebb_in_use = ceiling_fraction(memory_size, SRAM_BANK_SIZE);
258256

259257
return hp_sram_pm_banks(ebb_in_use);
260258
}

0 commit comments

Comments
 (0)