diff --git a/os/arch/arm/src/amebasmart/amebasmart_flash.c b/os/arch/arm/src/amebasmart/amebasmart_flash.c index af9cd75693..ba1e214b26 100644 --- a/os/arch/arm/src/amebasmart/amebasmart_flash.c +++ b/os/arch/arm/src/amebasmart/amebasmart_flash.c @@ -366,10 +366,10 @@ FAR struct mtd_dev_s *up_flashinitialize(void) #ifdef CONFIG_MTD_REGISTRATION priv->mtd.name = "ameba_flash"; #endif - u8 chip_id[4]; - flash_read_id(NULL, chip_id, 4); - lldbg("Manufacturer : %u memory type : %u capacity : %u\n", chip_id[0], chip_id[1], chip_id[2]); +/* For flash information, it will be printed during KM4 booting phase + For example: [FLASHCLK-I] Flash ID: ef-40-18 +*/ return (FAR struct mtd_dev_s *)priv; } #ifdef CONFIG_PM diff --git a/os/arch/arm/src/amebasmart/amebasmart_spi.c b/os/arch/arm/src/amebasmart/amebasmart_spi.c index 08794c0076..c012f027a9 100644 --- a/os/arch/arm/src/amebasmart/amebasmart_spi.c +++ b/os/arch/arm/src/amebasmart/amebasmart_spi.c @@ -1181,14 +1181,14 @@ static void amebasmart_spi_exchange(FAR struct spi_dev_s *dev, uint8_t *txbuff_aligned = NULL; rxbuff_aligned = (uint8_t *)rtw_zmalloc(SPI_DMA_MAX_BUFFER_SIZE); if(rxbuff_aligned == NULL) { - lldbg("rxbuff_aligned malloc failed\n"); + dbg_noarg("SPI RX malloc failed\n"); return; } if (txbuffer) { txbuff_aligned = (uint8_t *)rtw_zmalloc(SPI_DMA_MAX_BUFFER_SIZE); if(txbuff_aligned == NULL) { rtw_mfree(rxbuff_aligned, 0); - lldbg("txbuff_aligned malloc failed\n"); + dbg_noarg("SPI TX malloc failed\n"); return; } } diff --git a/os/arch/arm/src/common/up_initialize.c b/os/arch/arm/src/common/up_initialize.c index 1942756777..40172b5ab5 100644 --- a/os/arch/arm/src/common/up_initialize.c +++ b/os/arch/arm/src/common/up_initialize.c @@ -189,7 +189,7 @@ void up_initialize(void) #ifdef CONFIG_SYSTEM_REBOOT_REASON up_reboot_reason_init(); - lldbg("[Reboot Reason] : %d\n", up_reboot_reason_read()); + lldbg_noarg("[Reboot Reason]: %d\n", up_reboot_reason_read()); #endif /* Calibrate the timing loop */ diff --git a/os/board/rtl8730e/src/component/bluetooth/driver/platform/amebad2/hci/hci_platform.c b/os/board/rtl8730e/src/component/bluetooth/driver/platform/amebad2/hci/hci_platform.c index b3345dc018..8bcace73e6 100644 --- a/os/board/rtl8730e/src/component/bluetooth/driver/platform/amebad2/hci/hci_platform.c +++ b/os/board/rtl8730e/src/component/bluetooth/driver/platform/amebad2/hci/hci_platform.c @@ -972,7 +972,6 @@ static uint8_t* hci_platform_get_btfw_patch(uint32_t *rtlbt_fw_size) /* Below condition is minimal requirement to meet */ /* Address must be starting of the external flash, size shouldn't be larger than 128KB */ if(!((*rtlbt_fw_size > 0 && *rtlbt_fw_size < 0x20000) && (rtlbt_fw_addr == EXT_FLASH_BASE_ADDRESS))) { - dbg("Please check whether RTK data binary is flashed correctly!"); ASSERT(0); } if (rtlbt_fw_hdr_ptr) { diff --git a/os/board/rtl8730e/src/rtl8730e_boot.c b/os/board/rtl8730e/src/rtl8730e_boot.c index d12e4836a1..5245973308 100644 --- a/os/board/rtl8730e/src/rtl8730e_boot.c +++ b/os/board/rtl8730e/src/rtl8730e_boot.c @@ -322,8 +322,8 @@ void amebasmart_mount_partitions(void) /* Configure mtd partitions */ ret = configure_mtd_partitions(mtd, 0, &partinfo); if (ret != OK) { - lldbg("ERROR: configure_mtd_partitions for primary flash failed\n"); - return; + ret = __LINE__; + goto errout; } #ifdef CONFIG_AUTOMOUNT @@ -336,26 +336,31 @@ void amebasmart_mount_partitions(void) #ifdef CONFIG_MTD_JEDEC mtd = jedec_initialize(spi); if (mtd == NULL) { - lldbg("Jedec Init failed\n"); - return; + ret = __LINE__; + goto errout; } #elif defined(CONFIG_MTD_W25) mtd = w25_initialize(spi); if (mtd == NULL) { - lldbg("w25 Init failed\n"); - return; + ret = __LINE__; + goto errout; } #endif ret = configure_mtd_partitions(mtd, 1, &partinfo); if (ret != OK) { - lldbg("ERROR: configure_mtd_partitions for secondary flash failed\n"); - return; + ret = __LINE__; + goto errout; } #ifdef CONFIG_AUTOMOUNT automount_fs_partition(&partinfo); #endif -#endif /* end of CONFIG_SECOND_FLASH_PARTITION */ +#endif /* CONFIG_SECOND_FLASH_PARTITION */ +errout: + if (ret != OK) { + lldbg("Mounting failed, check line: %d\n", ret); + return; + } } #ifdef CONFIG_FTL_ENABLED