Ignore:
Timestamp:
Jul 19, 2017, 3:31:39 PM (7 years ago)
Author:
alain
Message:

Fixing bugs in vfs_lookup()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_dma.c

    r188 r238  
    4040extern chdev_directory_t  chdev_dir;         // allocated in kernel_init.c
    4141
    42 ////////////////////////////////////
    43 void dev_dma_init( chdev_t * chdev )
     42//////////////////////////////////
     43void dev_dma_init( chdev_t * dma )
    4444{
    45     // get implementation & channel from DMA chdev descriptor
    46     uint32_t impl    = chdev->impl;
    47     uint32_t channel = chdev->channel;
     45    // get implementation & channel from DMA dma descriptor
     46    uint32_t impl    = dma->impl;
     47    uint32_t channel = dma->channel;
    4848
    49     // set chdev name
    50     snprintf( chdev->name , 16 , "dma_%d_%x" , channel , local_cxy );
     49    // set dma name
     50    snprintf( dma->name , 16 , "dma_%d_%x" , channel , local_cxy );
    5151
    5252    // set field "cmd", "isr", and call the relevant driver init function
    5353    if( impl == IMPL_DMA_SCL )
    5454    {
    55         chdev->cmd = &soclib_dma_cmd;
    56         chdev->isr = &soclib_dma_isr;
    57         soclib_dma_init( chdev );
     55        dma->cmd = &soclib_dma_cmd;
     56        dma->isr = &soclib_dma_isr;
     57        soclib_dma_init( dma );
    5858    }
    5959    else
     
    6363
    6464    // bind IRQ to the core defined by the DMA channel
    65     dev_pic_bind_irq( channel , chdev );
     65    dev_pic_bind_irq( channel , dma );
    6666
    6767    // enable IRQ
    68     dev_pic_enable_irq( channel, chdev );
     68    dev_pic_enable_irq( channel, XPTR( local_cxy , dma ) );
    6969
    7070    // create server thread
     
    7575                                  THREAD_DEV,
    7676                                  &chdev_sequencial_server,
    77                                   chdev,
     77                                  dma,
    7878                                  cluster_select_local_core() );
    7979    if( error )
     
    8383
    8484    // initialises server field in DMA chdev descriptor
    85     chdev->server = new_thread;
     85    dma->server = new_thread;
    8686   
    8787    // start server thread
Note: See TracChangeset for help on using the changeset viewer.