Changeset 438 for trunk/kernel/fs/fatfs.c
- Timestamp:
- Apr 4, 2018, 2:49:02 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/fatfs.c
r435 r438 262 262 "no FAT access required for first page\n"); 263 263 264 #if CONFIG_DEBUG_FATFS_GET_CLUSTER264 #if DEBUG_FATFS_GET_CLUSTER 265 265 uint32_t cycle = (uint32_t)hal_get_cycles(); 266 if( CONFIG_DEBUG_FATFS_GET_CLUSTER < cycle )266 if( DEBUG_FATFS_GET_CLUSTER < cycle ) 267 267 printk("\n[DBG] %s : thread %x enter / first_cluster_id %d / searched_index / cycle %d\n", 268 268 __FUNCTION__, CURRENT_THREAD, first_cluster_id, searched_page_index, cycle ); … … 293 293 next_cluster_id = current_page_buffer[current_page_offset]; 294 294 295 #if ( CONFIG_DEBUG_FATFS_GET_CLUSTER & 1)296 if( CONFIG_DEBUG_FATFS_GET_CLUSTER < cycle )295 #if (DEBUG_FATFS_GET_CLUSTER & 1) 296 if( DEBUG_FATFS_GET_CLUSTER < cycle ) 297 297 printk("\n[DBG] %s : traverse FAT / current_page_index = %d\n" 298 298 "current_page_offset = %d / next_cluster_id = %d\n", … … 308 308 if( next_cluster_id == 0xFFFFFFFF ) return EIO; 309 309 310 #if CONFIG_DEBUG_FATFS_GET_CLUSTER310 #if DEBUG_FATFS_GET_CLUSTER 311 311 cycle = (uint32_t)hal_get_cycles(); 312 if( CONFIG_DEBUG_FATFS_GET_CLUSTER < cycle )312 if( DEBUG_FATFS_GET_CLUSTER < cycle ) 313 313 printk("\n[DBG] %s : thread %x exit / searched_cluster_id = %d / cycle %d\n", 314 314 __FUNCTION__, CURRENT_THREAD, next_cluster_id / cycle ); … … 345 345 uint8_t * buffer; 346 346 347 #if CONFIG_DEBUG_FATFS_INIT347 #if DEBUG_FATFS_INIT 348 348 uint32_t cycle = (uint32_t)hal_get_cycles(); 349 if( CONFIG_DEBUG_FATFS_INIT < cycle )349 if( DEBUG_FATFS_INIT < cycle ) 350 350 printk("\n[DBG] %s : thread %x enter for fatfs_ctx = %x / cycle %d\n", 351 351 __FUNCTION__ , CURRENT_THREAD , fatfs_ctx , cycle ); … … 370 370 "cannot access boot record\n" ); 371 371 372 #if ( CONFIG_DEBUG_FATFS_INIT & 0x1)373 if( CONFIG_DEBUG_FATFS_INIT < cycle )372 #if (DEBUG_FATFS_INIT & 0x1) 373 if( DEBUG_FATFS_INIT < cycle ) 374 374 { 375 375 uint32_t line; … … 448 448 fatfs_ctx->fat_mapper_xp = XPTR( local_cxy , fat_mapper ); 449 449 450 #if CONFIG_DEBUG_FATFS_INIT450 #if DEBUG_FATFS_INIT 451 451 cycle = (uint32_t)hal_get_cycles(); 452 if( CONFIG_DEBUG_FATFS_INIT < cycle )452 if( DEBUG_FATFS_INIT < cycle ) 453 453 printk("\n[DBG] %s : thread %x exit for fatfs_ctx = %x / cycle %d\n", 454 454 __FUNCTION__ , CURRENT_THREAD , fatfs_ctx , cycle ); … … 486 486 inode = mapper->inode; 487 487 488 #if CONFIG_DEBUG_FATFS_MOVE488 #if DEBUG_FATFS_MOVE 489 489 uint32_t cycle = (uint32_t)hal_get_cycles(); 490 if( CONFIG_DEBUG_FATFS_MOVE < cycle )490 if( DEBUG_FATFS_MOVE < cycle ) 491 491 printk("\n[DBG] %s : thread %x enter / page %d / inode %x / mapper %x / cycle %d\n", 492 492 __FUNCTION__ , CURRENT_THREAD , index , inode , mapper , cycle ); … … 507 507 lba = fatfs_ctx->fat_begin_lba + (count * index); 508 508 509 #if ( CONFIG_DEBUG_FATFS_MOVE & 0x1)510 if( CONFIG_DEBUG_FATFS_MOVE < cycle )509 #if (DEBUG_FATFS_MOVE & 0x1) 510 if( DEBUG_FATFS_MOVE < cycle ) 511 511 printk("\n[DBG] %s : access FAT on device / lba = %d\n", __FUNCTION__ , lba ); 512 512 #endif … … 541 541 { 542 542 543 #if ( CONFIG_DEBUG_FATFS_MOVE & 0x1)544 if( CONFIG_DEBUG_FATFS_MOVE < cycle )543 #if (DEBUG_FATFS_MOVE & 0x1) 544 if( DEBUG_FATFS_MOVE < cycle ) 545 545 print("\n[DBG] %s : access local FAT mapper\n" 546 546 "fat_mapper_cxy = %x / fat_mapper_ptr = %x / first_cluster_id = %d / index = %d\n", … … 555 555 { 556 556 557 #if ( CONFIG_DEBUG_FATFS_MOVE & 0x1)558 if( CONFIG_DEBUG_FATFS_MOVE < cycle )557 #if (DEBUG_FATFS_MOVE & 0x1) 558 if( DEBUG_FATFS_MOVE < cycle ) 559 559 printk("\n[DBG] %s : access remote FAT mapper\n" 560 560 "fat_mapper_cxy = %x / fat_mapper_ptr = %x / first_cluster_id = %d / index = %d\n", … … 572 572 } 573 573 574 #if ( CONFIG_DEBUG_FATFS_MOVE & 0x1)575 if( CONFIG_DEBUG_FATFS_MOVE < cycle )574 #if (DEBUG_FATFS_MOVE & 0x1) 575 if( DEBUG_FATFS_MOVE < cycle ) 576 576 printk("\n[DBG] %s : access device for inode %x / cluster_id %d\n", 577 577 __FUNCTION__ , inode , searched_cluster_id ); … … 588 588 } 589 589 590 #if CONFIG_DEBUG_FATFS_MOVE590 #if DEBUG_FATFS_MOVE 591 591 cycle = (uint32_t)hal_get_cycles(); 592 if( CONFIG_DEBUG_FATFS_MOVE < cycle )592 if( DEBUG_FATFS_MOVE < cycle ) 593 593 printk("\n[DBG] %s : thread %x exit / page %d / inode %x / mapper %x / cycle %d\n", 594 594 __FUNCTION__ , CURRENT_THREAD , index , inode , mapper , cycle ); 595 595 #endif 596 596 597 #if ( CONFIG_DEBUG_FATFS_MOVE & 0x1)598 if( CONFIG_DEBUG_FATFS_MOVE < cycle )597 #if (DEBUG_FATFS_MOVE & 0x1) 598 if( DEBUG_FATFS_MOVE < cycle ) 599 599 { 600 600 uint32_t * tab = (uint32_t *)buffer; … … 623 623 // - scan the directory entries in each 4 Kbytes page 624 624 625 #if CONFIG_DEBUG_FATFS_LOAD625 #if DEBUG_FATFS_LOAD 626 626 uint32_t cycle = (uint32_t)hal_get_cycles(); 627 if( CONFIG_DEBUG_FATFS_LOAD < cycle )627 if( DEBUG_FATFS_LOAD < cycle ) 628 628 printk("\n[DBG] %s : thread %x enter for child <%s> in parent inode %x / cycle %d\n", 629 629 __FUNCTION__ , CURRENT_THREAD , name , parent_inode , cycle ); … … 665 665 base = (uint8_t *)GET_PTR( base_xp ); 666 666 667 #if ( CONFIG_DEBUG_FATFS_LOAD & 0x1)668 if( CONFIG_DEBUG_FATFS_LOAD < cycle )667 #if (DEBUG_FATFS_LOAD & 0x1) 668 if( DEBUG_FATFS_LOAD < cycle ) 669 669 { 670 670 uint32_t * buf = (uint32_t *)base; … … 749 749 { 750 750 751 #if CONFIG_DEBUG_FATFS_LOAD751 #if DEBUG_FATFS_LOAD 752 752 cycle = (uint32_t)hal_get_cycles(); 753 if( CONFIG_DEBUG_FATFS_LOAD < cycle )753 if( DEBUG_FATFS_LOAD < cycle ) 754 754 printk("\n[DBG] %s : thread %x exit / child <%s> not found / cycle %d\n", 755 755 __FUNCTION__ , CURRENT_THREAD, name, cycle ); … … 771 771 hal_remote_sw( XPTR( child_cxy , &child_ptr->extend ) , cluster ); 772 772 773 #if CONFIG_DEBUG_FATFS_LOAD773 #if DEBUG_FATFS_LOAD 774 774 cycle = (uint32_t)hal_get_cycles(); 775 if( CONFIG_DEBUG_FATFS_LOAD < cycle )775 if( DEBUG_FATFS_LOAD < cycle ) 776 776 printk("\n[DBG] %s : thread %x exit / child <%s> loaded / cycle %d\n", 777 777 __FUNCTION__ , CURRENT_THREAD, name, cycle );
Note: See TracChangeset
for help on using the changeset viewer.