espressif: Use BOOT_LOG_* macros instead of the MCUBOOT_LOG_*

Also refined the include directives, by removing unused headers and
making the usage of brackets and quotes a bit more coherent,

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
diff --git a/boot/espressif/port/esp_loader.c b/boot/espressif/port/esp_loader.c
index 6e8d2cb..9e6aef6 100644
--- a/boot/espressif/port/esp_loader.c
+++ b/boot/espressif/port/esp_loader.c
@@ -5,28 +5,23 @@
  */
 
 #include <string.h>
-#include <soc/soc.h>
-#include "soc/soc_memory_layout.h"
-#include <bootloader_flash.h>
-#include <bootloader_flash_priv.h>
 
-#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2)
-#include <soc/dport_reg.h>
+#include <bootutil/bootutil_log.h>
+#include <bootutil/fault_injection_hardening.h>
+
+#include "bootloader_flash_priv.h"
+#include "soc/soc_memory_layout.h"
+
+#if CONFIG_IDF_TARGET_ESP32
+#include "esp32/rom/uart.h"
+#elif CONFIG_IDF_TARGET_ESP32S2
+#include "esp32s2/rom/uart.h"
+#elif CONFIG_IDF_TARGET_ESP32C3
+#include "esp32c3/rom/uart.h"
 #endif
 
-#include "rom/cache.h"
-#include "rom/efuse.h"
-#include "rom/ets_sys.h"
-#include "rom/spi_flash.h"
-#include "rom/crc.h"
-#include "rom/rtc.h"
-#include "rom/gpio.h"
-#include "rom/uart.h"
-
-#include <esp_loader.h>
-#include <bootutil/fault_injection_hardening.h>
-#include <flash_map_backend/flash_map_backend.h>
-#include <mcuboot_config/mcuboot_logging.h>
+#include "esp_loader.h"
+#include "flash_map_backend/flash_map_backend.h"
 
 #define ESP_LOAD_HEADER_MAGIC 0xace637d3   /* Magic is derived from sha256sum of espmcuboot */
 
@@ -48,7 +43,7 @@
 {
     const uint32_t *data = (const uint32_t *)bootloader_mmap((fap->fa_off + data_addr), data_len);
     if (!data) {
-        MCUBOOT_LOG_ERR("%s: Bootloader nmap failed", __func__);
+        BOOT_LOG_ERR("%s: Bootloader mmap failed", __func__);
         return -1;
     }
     memcpy((void *)load_addr, data, data_len);
@@ -67,7 +62,7 @@
     area_id = flash_area_id_from_image_slot(slot);
     rc = flash_area_open(area_id, &fap);
     if (rc != 0) {
-        MCUBOOT_LOG_ERR("%s: flash_area_open failed with %d", __func__, rc);
+        BOOT_LOG_ERR("%s: flash_area_open failed with %d", __func__, rc);
     }
 
     const uint32_t *data = (const uint32_t *)bootloader_mmap((fap->fa_off + hdr_offset), sizeof(image_load_header_t));
@@ -75,32 +70,32 @@
     bootloader_munmap(data);
 
     if (load_header.header_magic != ESP_LOAD_HEADER_MAGIC) {
-        MCUBOOT_LOG_ERR("Load header magic verification failed. Aborting");
+        BOOT_LOG_ERR("Load header magic verification failed. Aborting");
         FIH_PANIC;
     }
 
     if (!esp_ptr_in_iram((void *)load_header.iram_dest_addr) || !esp_ptr_in_iram((void *)(load_header.iram_dest_addr + load_header.iram_size))) {
-        MCUBOOT_LOG_ERR("IRAM region in load header is not valid. Aborting");
+        BOOT_LOG_ERR("IRAM region in load header is not valid. Aborting");
         FIH_PANIC;
     }
 
     if (!esp_ptr_in_dram((void *)load_header.dram_dest_addr) || !esp_ptr_in_dram((void *)load_header.dram_dest_addr + load_header.dram_size)) {
-        MCUBOOT_LOG_ERR("DRAM region in load header is not valid. Aborting");
+        BOOT_LOG_ERR("DRAM region in load header is not valid. Aborting");
         FIH_PANIC;
     }
 
     if (!esp_ptr_in_iram((void *)load_header.entry_addr)) {
-        MCUBOOT_LOG_ERR("Application entry point (0x%x) is not in IRAM. Aborting", load_header.entry_addr);
+        BOOT_LOG_ERR("Application entry point (0x%x) is not in IRAM. Aborting", load_header.entry_addr);
         FIH_PANIC;
     }
 
-    MCUBOOT_LOG_INF("DRAM segment: start=0x%x, size=0x%x, vaddr=0x%x", load_header.dram_flash_offset, load_header.dram_size, load_header.dram_dest_addr);
+    BOOT_LOG_INF("DRAM segment: start=0x%x, size=0x%x, vaddr=0x%x", load_header.dram_flash_offset, load_header.dram_size, load_header.dram_dest_addr);
     load_segment(fap, load_header.dram_flash_offset, load_header.dram_size, load_header.dram_dest_addr);
 
-    MCUBOOT_LOG_INF("IRAM segment: start=0x%x, size=0x%x, vaddr=0x%x", load_header.iram_flash_offset, load_header.iram_size, load_header.iram_dest_addr);
+    BOOT_LOG_INF("IRAM segment: start=0x%x, size=0x%x, vaddr=0x%x", load_header.iram_flash_offset, load_header.iram_size, load_header.iram_dest_addr);
     load_segment(fap, load_header.iram_flash_offset, load_header.iram_size, load_header.iram_dest_addr);
 
-    MCUBOOT_LOG_INF("start=0x%x", load_header.entry_addr);
+    BOOT_LOG_INF("start=0x%x", load_header.entry_addr);
     uart_tx_wait_idle(0);
     void *start = (void *) load_header.entry_addr;
     ((void (*)(void))start)(); /* Call to application entry address should not return */