summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Peress <peress@google.com>2023-04-13 21:50:39 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-14 14:31:42 +0000
commit1f6627b4b59de3f9ed859ac351fd364a5c7fce68 (patch)
tree0ecc89bb64b2c26425b9e1ca046d9a63a316fb62
parentcbf9f6e5df8f6f5cc8fbf284ba45d1b901542cd7 (diff)
downloadchrome-ec-1f6627b4b59de3f9ed859ac351fd364a5c7fce68.tar.gz
zephyr: Remove deprecated calls to ceiling_fraction()
The ceiling_fraction() macro was deprecated, use DIV_ROUND_UP() instead. BRANCH=none BUG=none TEST=zmake build --all Change-Id: I1dede993fbaebb0fb50f8082412196a0ffdb9c75 Signed-off-by: Yuval Peress <peress@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4426789 Commit-Queue: Al Semjonovs <asemjonovs@google.com> Reviewed-by: Al Semjonovs <asemjonovs@google.com>
-rw-r--r--zephyr/drivers/cros_system/cros_system_npcx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/zephyr/drivers/cros_system/cros_system_npcx.c b/zephyr/drivers/cros_system/cros_system_npcx.c
index 01e7f1efe6..45009709cf 100644
--- a/zephyr/drivers/cros_system/cros_system_npcx.c
+++ b/zephyr/drivers/cros_system/cros_system_npcx.c
@@ -10,6 +10,7 @@
#include "soc_gpio.h"
#include "soc_miwu.h"
#include "system.h"
+#include "util.h"
#include <zephyr/arch/arm/aarch32/cortex_m/cmsis.h>
#include <zephyr/drivers/gpio.h>
@@ -280,9 +281,9 @@ system_npcx_hibernate_by_lfw_in_last_ram(const struct device *dev,
static inline int system_npcx_get_ram_blk_by_lfw_addr(char *address)
{
return NPCX_RAM_BLOCK_COUNT -
- ceiling_fraction((uint32_t)address -
- CONFIG_CROS_EC_PROGRAM_MEMORY_BASE,
- NPCX_RAM_BLOCK_SIZE);
+ DIV_ROUND_UP((uint32_t)address -
+ CONFIG_CROS_EC_PROGRAM_MEMORY_BASE,
+ NPCX_RAM_BLOCK_SIZE);
}
static void system_npcx_hibernate_by_disable_ram(const struct device *dev,