Changeset 238 for trunk/hal/tsar_mips32


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

Fixing bugs in vfs_lookup()

Location:
trunk/hal/tsar_mips32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_drivers.c

    r216 r238  
    2323#include <chdev.h>
    2424#include <hal_drivers.h>
    25 #include <hal_internal.h>
     25#include <printk.h>
    2626
    2727#include <soclib_tty.h>
    28 #include <soclib_xcu.h>
    2928#include <soclib_pic.h>
     29#include <soclib_bdv.h>
     30#include <soclib_hba.h>
    3031
    31 void hal_drivers_txt_init(chdev_t *dev)
     32///////////////////////////////////////////////////////////////////////////////
     33//    TXT
     34///////////////////////////////////////////////////////////////////////////////
     35
     36//////////////////////////////////////////
     37void hal_drivers_txt_init( chdev_t * txt )
    3238{
    33         soclib_tty_init(dev);
     39        soclib_tty_init( txt );
    3440}
    3541
    36 /* -------------------------------------------------------------------------- */
     42///////////////////////////////////////////////////////////////////////////////
     43//    PIC
     44///////////////////////////////////////////////////////////////////////////////
    3745
    38 void hal_drivers_xcu_init(chdev_t *dev, lid_t lid)
     46//////////////////////////////////////////
     47void hal_drivers_pic_init( chdev_t * pic )
    3948{
    40         soclib_xcu_init(dev, lid);
     49        soclib_pic_init( pic );
     50
     51        /* update the PIC chdev extension */
     52        pic->ext.pic.enable_timer = &soclib_pic_enable_timer;
     53        pic->ext.pic.enable_irq   = &soclib_pic_enable_irq;
     54        pic->ext.pic.disable_irq  = &soclib_pic_disable_irq;
     55        pic->ext.pic.bind_irq     = &soclib_pic_bind_irq;
     56        pic->ext.pic.send_ipi     = &soclib_pic_send_ipi;
     57        pic->ext.pic.extend_init  = &soclib_pic_extend_init;
    4158}
    4259
    43 void hal_drivers_xcu_disable_irq(chdev_t *icu, uint32_t irq_index,
    44     uint32_t irq_type, lid_t lid)
     60///////////////////////////////////////////////////////////////////////////////
     61//    IOC
     62///////////////////////////////////////////////////////////////////////////////
     63
     64//////////////////////////////////////////
     65void hal_drivers_ioc_init( chdev_t  * ioc,
     66                           uint32_t   impl )
    4567{
    46         soclib_xcu_disable_irq(icu, 1 << irq_index, irq_type, lid);
    47 }
    48 
    49 void hal_drivers_xcu_enable_irq(chdev_t *icu, uint32_t irq_index,
    50     uint32_t irq_type, lid_t lid)
    51 {
    52         soclib_xcu_enable_irq(icu, 1 << irq_index, irq_type, lid);
    53 }
    54 
    55 /* -------------------------------------------------------------------------- */
    56 
    57 void hal_drivers_pic_init(chdev_t *dev)
    58 {
    59         soclib_pic_init(dev);
    60 
    61         /* update the PIC chdev extension */
    62         dev->ext.pic.enable_timer = &soclib_pic_enable_timer;
    63         dev->ext.pic.enable_irq   = &soclib_pic_enable_irq;
    64         dev->ext.pic.disable_irq  = &soclib_pic_disable_irq;
    65         dev->ext.pic.bind_irq     = &soclib_pic_bind_irq;
    66         dev->ext.pic.send_ipi     = &soclib_pic_send_ipi;
    67         dev->ext.pic.extend_init  = &soclib_pic_extend_init;
    68 }
    69 
    70 /* -------------------------------------------------------------------------- */
    71 
    72 void hal_drivers_ioc_init(chdev_t *dev, uint32_t impl)
    73 {
    74         if (impl == IMPL_IOC_BDV) {
    75                 soclib_bdv_init(dev);
    76         } else if (impl == IMPL_IOC_HBA) {
    77                 soclib_hba_init(dev);
    78         } else {
     68        if (impl == IMPL_IOC_BDV)
     69    {
     70                soclib_bdv_init( ioc );
     71        }
     72    else if (impl == IMPL_IOC_HBA)
     73    {
     74                soclib_hba_init( ioc );
     75        }
     76    else
     77    {
    7978                assert( false , __FUNCTION__ , "undefined IOC device implementation" );
    8079        }
  • trunk/hal/tsar_mips32/core/hal_interrupt.c

    r188 r238  
    2727#include <do_interrupt.h>
    2828#include <hal_interrupt.h>
    29 #include<mips32_uzone.h>
     29#include <mips32_uzone.h>
     30#include <soclib_pic.h>
    3031
    3132///////////////////////////////////////
     
    3637        thread_user_time_update( this );
    3738
    38     // access ICU device to call the relevant ISR
     39    // access local ICU to call the relevant ISR
    3940    soclib_pic_irq_handler();
    4041           
  • trunk/hal/tsar_mips32/drivers/soclib_pic.h

    r205 r238  
    172172 * @ chdev    : pointer on PIC chdev descriptor.
    173173 *****************************************************************************************/
    174 void   soclib_pic_init( chdev_t * pic );
     174void   soclib_pic_init( struct chdev_s * pic );
    175175
    176176/*****************************************************************************************
     
    202202 * @ src_chdev  : local pointer on source chdev descriptor.
    203203 *****************************************************************************************/
    204 void soclib_pic_bind_irq( lid_t     lid,
    205                           chdev_t * src_chdev );
     204void soclib_pic_bind_irq( lid_t            lid,
     205                          struct chdev_s * src_chdev );
    206206
    207207/******************************************************************************************
     
    296296 * This SOCLIB PIC specific is the call-back function is the interrupt handler.
    297297 *****************************************************************************************/
    298 void soclip_pic_irq_handler();
     298void soclib_pic_irq_handler();
    299299
    300300
Note: See TracChangeset for help on using the changeset viewer.