summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/common/block/fast_spi/fast_spi_flash.c5
-rw-r--r--src/soc/intel/common/smbios.c3
-rw-r--r--src/soc/intel/quark/i2c.c3
-rw-r--r--src/soc/intel/skylake/elog.c3
4 files changed, 9 insertions, 5 deletions
diff --git a/src/soc/intel/common/block/fast_spi/fast_spi_flash.c b/src/soc/intel/common/block/fast_spi/fast_spi_flash.c
index 0a4344272e..f887b3c800 100644
--- a/src/soc/intel/common/block/fast_spi/fast_spi_flash.c
+++ b/src/soc/intel/common/block/fast_spi/fast_spi_flash.c
@@ -14,6 +14,7 @@
*/
#include <device/mmio.h>
+#include <commonlib/helpers.h>
#include <console/console.h>
#include <fast_spi_def.h>
#include <intelblocks/fast_spi.h>
@@ -157,11 +158,11 @@ static int exec_sync_hwseq_xfer(struct fast_spi_flash_ctx *ctx,
static size_t get_xfer_len(const struct spi_flash *flash, uint32_t addr,
size_t len)
{
- size_t xfer_len = min(len, SPIBAR_FDATA_FIFO_SIZE);
+ size_t xfer_len = MIN(len, SPIBAR_FDATA_FIFO_SIZE);
size_t bytes_left = ALIGN_UP(addr, flash->page_size) - addr;
if (bytes_left)
- xfer_len = min(xfer_len, bytes_left);
+ xfer_len = MIN(xfer_len, bytes_left);
return xfer_len;
}
diff --git a/src/soc/intel/common/smbios.c b/src/soc/intel/common/smbios.c
index d315e15f28..e1b71ba1f0 100644
--- a/src/soc/intel/common/smbios.c
+++ b/src/soc/intel/common/smbios.c
@@ -16,6 +16,7 @@
#include <smbios.h>
#include "smbios.h"
#include <string.h>
+#include <commonlib/helpers.h>
#include <console/console.h>
#include <device/dram/ddr3.h>
@@ -63,7 +64,7 @@ void dimm_info_fill(struct dimm_info *dimm, u32 dimm_capacity, u8 ddr_type,
strncpy((char *)dimm->module_part_number,
module_part_num,
- min(sizeof(dimm->module_part_number),
+ MIN(sizeof(dimm->module_part_number),
module_part_number_size));
if (module_serial_num)
memcpy(dimm->serial, module_serial_num,
diff --git a/src/soc/intel/quark/i2c.c b/src/soc/intel/quark/i2c.c
index 7ff2ddf93f..6430030e6b 100644
--- a/src/soc/intel/quark/i2c.c
+++ b/src/soc/intel/quark/i2c.c
@@ -14,6 +14,7 @@
*/
#include <assert.h>
+#include <commonlib/helpers.h>
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
@@ -133,7 +134,7 @@ static int platform_i2c_read(uint32_t restart, uint8_t *rx_buffer, int length,
}
/* Fill the FIFO with read commands */
- fifo_bytes = min(length, 16);
+ fifo_bytes = MIN(length, 16);
bytes_transferred = 0;
while (length > 0) {
status = regs->ic_raw_intr_stat;
diff --git a/src/soc/intel/skylake/elog.c b/src/soc/intel/skylake/elog.c
index 795139418d..411b3e99a1 100644
--- a/src/soc/intel/skylake/elog.c
+++ b/src/soc/intel/skylake/elog.c
@@ -16,6 +16,7 @@
#include <bootstate.h>
#include <cbmem.h>
+#include <commonlib/helpers.h>
#include <console/console.h>
#include <device/mmio.h>
#include <device/pci_ops.h>
@@ -156,7 +157,7 @@ static void pch_log_rp_wake_source(void)
{ PCH_DEV_PCIE24, 0x60, ELOG_WAKE_SOURCE_PME_PCIE24 },
};
- maxports = min(CONFIG_MAX_ROOT_PORTS, ARRAY_SIZE(pme_status_info));
+ maxports = MIN(CONFIG_MAX_ROOT_PORTS, ARRAY_SIZE(pme_status_info));
for (i = 0; i < maxports; i++) {
dev = pme_status_info[i].dev;