From 4dbab5d27f1768873c5f5342098be1c3a840a130 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Mon, 30 Jan 2017 18:26:07 -0800 Subject: [PATCH] rockchip: Add MIN() and MAX() macros back to M0 code These macros were accidentally deleted in a previous cleanup. This slipped through because the code using them is currently unused, but that may change in the future. Signed-off-by: Julius Werner --- plat/rockchip/rk3399/drivers/m0/include/rk3399_mcu.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plat/rockchip/rk3399/drivers/m0/include/rk3399_mcu.h b/plat/rockchip/rk3399/drivers/m0/include/rk3399_mcu.h index 548d5f6c6..b6ea3e880 100644 --- a/plat/rockchip/rk3399/drivers/m0/include/rk3399_mcu.h +++ b/plat/rockchip/rk3399/drivers/m0/include/rk3399_mcu.h @@ -46,6 +46,9 @@ typedef unsigned int uint32_t; #define mmio_clrsetbits_32(addr, clear, set) \ mmio_write_32(addr, (mmio_read_32(addr) & ~(clear)) | (set)) +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + void handle_suspend(void); void handle_dram(void); void stopwatch_init_usecs_expire(unsigned int usecs);