diff options
| author | sakumisu <[email protected]> | 2025-06-16 20:30:23 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2025-06-16 20:30:23 +0800 |
| commit | 300907dd4c64317abe6354fcd143fcbc0486918c (patch) | |
| tree | 6c8dd6b9a055f81d640bf17d32a7303ebb392cf0 | |
| parent | 0916749a32c3a85d53753fa0a4d4af4d54804ada (diff) | |
update(platform/rtthread): move cache check into usb_check.c
Signed-off-by: sakumisu <[email protected]>
| -rw-r--r-- | platform/rtthread/usb_check.c | 17 | ||||
| -rw-r--r-- | platform/rtthread/usbh_dfs.c | 16 |
2 files changed, 17 insertions, 16 deletions
diff --git a/platform/rtthread/usb_check.c b/platform/rtthread/usb_check.c index adec2c51..9ea03c20 100644 --- a/platform/rtthread/usb_check.c +++ b/platform/rtthread/usb_check.c @@ -11,3 +11,20 @@ #endif #endif + +#if defined(ARCH_ARM_CORTEX_M7) || \ + defined(SOC_HPM6000) || defined(SOC_HPM6E00) || defined(SOC_HPM6P00) || \ + defined(BSP_USING_BL61X) || defined(BSP_USING_BL808) +#ifndef RT_USING_CACHE +#error RT_USING_CACHE must be enabled in this chip +#endif +#endif + +#ifdef RT_USING_CACHE +#ifndef CONFIG_USB_DCACHE_ENABLE +#error CONFIG_USB_DCACHE_ENABLE must be enabled +#endif +#if RT_ALIGN_SIZE != 32 && RT_ALIGN_SIZE != 64 +#error RT_ALIGN_SIZE must be cacheline to 32 or 64 +#endif +#endif diff --git a/platform/rtthread/usbh_dfs.c b/platform/rtthread/usbh_dfs.c index 00f5a033..7cdfe116 100644 --- a/platform/rtthread/usbh_dfs.c +++ b/platform/rtthread/usbh_dfs.c @@ -19,22 +19,6 @@ #define CONFIG_USB_DFS_MOUNT_POINT "/" #endif -#if defined(SOC_SERIES_STM32H7) || defined(SOC_SERIES_STM32F7) || defined(SOC_SERIES_STM32H7RS) ||\ - defined(SOC_HPM5000) || defined(SOC_HPM6000) || defined(SOC_HPM6E00) || defined(BSP_USING_BL61X) -#ifndef RT_USING_CACHE -#error usbh msc must enable RT_USING_CACHE in this chip -#endif -#if RT_ALIGN_SIZE != 32 && RT_ALIGN_SIZE != 64 -#error usbh msc must set cache line to 32 or 64 -#endif -#endif - -#ifdef RT_USING_CACHE -#ifndef CONFIG_USB_DCACHE_ENABLE -#error CONFIG_USB_DCACHE_ENABLE must be enabled to use msc disk -#endif -#endif - static rt_err_t rt_udisk_init(rt_device_t dev) { struct usbh_msc *msc_class = (struct usbh_msc *)dev->user_data; |
