Changeset 550 for trunk/kernel
- Timestamp:
- Sep 21, 2018, 10:24:15 PM (6 years ago)
- Location:
- trunk/kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_pic.h
r534 r550 142 142 uint32_t mmc; // MMC is single channel 143 143 uint32_t mtty; // Multi Tty (backup tty in cluster 0) 144 uint32_t sdcard; // SD card on cluster 00 144 145 } 145 146 lapic_input_t; -
trunk/kernel/kern/kernel_init.c
r539 r550 423 423 } 424 424 425 /////////////////////////////// 425 426 else if ( func == DEV_FUNC_TXT && info->use_mty0 == 1 ) 426 427 { … … 465 466 } 466 467 } 468 #if( DEBUG_KERNEL_INIT & 0x1 ) 469 if( hal_time_stamp() > DEBUG_KERNEL_INIT ) 470 printk("\n[DBG] %s : created MTY[%d] in cluster %x / chdev = %x\n", 471 __FUNCTION__ , channel , local_cxy , chdev_ptr ); 472 #endif 467 473 } 468 474 } 469 475 } 476 477 /////////////////////////////// 478 else if ( func == DEV_FUNC_IOC ) 479 { 480 assert(impl == IMPL_IOC_SPI, __FUNCTION__, 481 "Internal IOC should have SPI implementation\n"); 482 483 for ( channel = 0; channel < channels; channel++ ) 484 { 485 // create chdev in local cluster 486 chdev_ptr = chdev_create( func, 487 impl, 488 channel, 489 0, 490 base ); 491 492 assert( (chdev_ptr != NULL) , __FUNCTION__ , 493 "cannot allocate memory for IOC chdev" ); 494 495 // make IOC specific initialization 496 dev_ioc_init( chdev_ptr ); 497 498 // set the IOC fields in all clusters 499 xptr_t *chdev_entry = &chdev_dir.ioc[channel]; 500 for ( x = 0; x < info->x_max; x++ ) 501 { 502 for ( y = 0; y < info->y_max; y++ ) 503 { 504 cxy_t cxy = (x<<info->y_width) + y; 505 hal_remote_swd( XPTR( cxy, chdev_entry ), 506 XPTR( local_cxy, chdev_ptr ) ); 507 } 508 } 509 #if( DEBUG_KERNEL_INIT & 0x1 ) 510 if( hal_time_stamp() > DEBUG_KERNEL_INIT ) 511 printk("\n[DBG] %s : created IOC[%d] in cluster %x / chdev = %x\n", 512 __FUNCTION__ , channel , local_cxy , chdev_ptr ); 513 #endif 514 } 515 } 516 470 517 } 471 518 } // end internal_devices_init() … … 556 603 } 557 604 605 if ( func == DEV_FUNC_IOC && impl == IMPL_IOC_SPI ) 606 { 607 continue; 608 } 609 558 610 // compute target cluster for chdev[func,channel,direction] 559 611 uint32_t offset = ext_chdev_gid % ( info->x_size * (info->y_max) ); // [FIXME] … … 814 866 else if( func == DEV_FUNC_DMA ) lapic_input.dma[channel] = id; 815 867 else if( func == DEV_FUNC_TXT ) lapic_input.mtty = id; 868 else if( func == DEV_FUNC_IOC ) lapic_input.sdcard = id; 816 869 else assert( false , "illegal source device for LAPIC input" ); 817 870 }
Note: See TracChangeset
for help on using the changeset viewer.