summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-09-12 14:40:33 +0800
committersakumisu <[email protected]>2022-09-12 14:44:48 +0800
commit511d2bdc5d2f638aafec951d747f67a220922ff9 (patch)
tree0ad9e138c36a3b3c04b910aadc11fccbccd3b4dc
parent9615a468dcde143d1f121250dc4940372e35351e (diff)
remove align64 and dcache process for hpm
-rw-r--r--CMakeLists.txt2
-rw-r--r--demo/hpm/usb_device/src/hello_world.c1
-rw-r--r--port/hpm/usb_dc_hpm.c14
3 files changed, 0 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ab0aec2..0c748588 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,8 +9,6 @@ sdk_inc(class/audio)
sdk_inc(class/video)
sdk_inc(class/hub)
-sdk_compile_definitions(-DCONFIG_USB_ALIGN_SIZE=64)
-
if(CONFIG_CHERRYUSB_DEVICE)
sdk_src(core/usbd_core.c)
sdk_src(port/hpm/usb_dc_hpm.c)
diff --git a/demo/hpm/usb_device/src/hello_world.c b/demo/hpm/usb_device/src/hello_world.c
index 8427b757..f091f92f 100644
--- a/demo/hpm/usb_device/src/hello_world.c
+++ b/demo/hpm/usb_device/src/hello_world.c
@@ -15,7 +15,6 @@ int main(void)
{
int u;
- l1c_dc_disable();
board_init();
board_init_led_pins();
board_init_usb_pins();
diff --git a/port/hpm/usb_dc_hpm.c b/port/hpm/usb_dc_hpm.c
index 16ddd825..fc0aa900 100644
--- a/port/hpm/usb_dc_hpm.c
+++ b/port/hpm/usb_dc_hpm.c
@@ -10,8 +10,6 @@
#define USB_NUM_BIDIR_ENDPOINTS USB_SOC_DCD_MAX_ENDPOINT_COUNT
#endif
-#define USB_ALIGN(size, align) (((size) + (align)-1) & ~((align)-1))
-
/* USBSTS, USBINTR */
enum {
intr_usb = HPM_BITSMASK(1, 0),
@@ -156,12 +154,6 @@ int usbd_ep_start_write(const uint8_t ep, const uint8_t *data, uint32_t data_len
g_hpm_udc.in_ep[ep_idx].xfer_len = data_len;
g_hpm_udc.in_ep[ep_idx].actual_xfer_len = 0;
-#ifdef CONFIG_USB_DCACHE_ENABLE
- if (data_len != 0) {
- uint32_t align_len = USB_ALIGN(data_len, CONFIG_DCACHE_LINE_SIZE);
- l1c_dc_writeback((uint32_t)data, align_len);
- }
-#endif
usb_device_edpt_xfer(handle, ep, data, data_len);
return 0;
@@ -259,12 +251,6 @@ void USBD_IRQHandler(void)
if (ep_addr & 0x80) {
usbd_event_ep_in_complete_handler(ep_addr, transfer_len);
} else {
-#ifdef CONFIG_USB_DCACHE_ENABLE
- if (transfer_len) {
- uint32_t align_len = USB_ALIGN(transfer_len, CONFIG_DCACHE_LINE_SIZE);
- l1c_dc_invalidate((uint32_t)g_hpm_udc.out_ep[ep_idx].xfer_buf, align_len);
- }
-#endif
usbd_event_ep_out_complete_handler(ep_addr, transfer_len);
}
}