Changeset 252 for trunk


Ignore:
Timestamp:
Jul 20, 2017, 1:30:05 PM (7 years ago)
Author:
max@…
Message:

Hide IMPL_PIC_.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/generic/hal_drivers.h

    r245 r252  
    2727void hal_drivers_txt_init(chdev_t *txt, uint32_t impl);
    2828
    29 void hal_drivers_pic_init(chdev_t *pic);
     29void hal_drivers_pic_init(chdev_t *pic, uint32_t impl);
    3030
    3131void hal_drivers_ioc_init(chdev_t *ioc, uint32_t impl);
  • trunk/hal/tsar_mips32/core/hal_drivers.c

    r245 r252  
    5353
    5454//////////////////////////////////////////
    55 void hal_drivers_pic_init( chdev_t * pic )
     55void hal_drivers_pic_init( chdev_t  * pic,
     56                           uint32_t   impl )
    5657{
     58    if( impl != IMPL_PIC_SCL )
     59    {
     60        assert( false , __FUNCTION__ , "undefined PIC device implementation" );
     61    }
     62
    5763        soclib_pic_init( pic );
    5864
  • trunk/hal/x86_64/core/hal_drivers.c

    r250 r252  
    3636/* -------------------------------------------------------------------------- */
    3737
    38 void hal_drivers_pic_init(chdev_t *pic)
     38void hal_drivers_pic_init(chdev_t *pic, uint32_t impl)
    3939{
     40        if (impl != IMPL_PIC_I86) {
     41                x86_panic("undefined PIC device implementation");
     42        }
     43
    4044        pic_apic_init(pic);
    4145
  • trunk/hal/x86_64/core/hal_init.c

    r240 r252  
    189189
    190190        dev->base = 0;
    191         dev->type = (DEV_FUNC_PIC << 16) | IMPL_PIC_SCL;
     191        dev->type = (DEV_FUNC_PIC << 16) | IMPL_PIC_I86;
    192192        dev->channels = 1;
    193193        dev->param0 = 0;
     
    253253        info->rsvd_nr = init_bootinfo_rsvd((boot_rsvd_t *)&info->rsvd);
    254254
    255         /* TODO: dev_icu */
    256255        /* TODO: dev_mmc */
    257256        /* TODO: dev_dma */
  • trunk/kernel/devices/dev_pic.c

    r206 r252  
    4545    strcpy( pic->name , "pic" );
    4646
    47     // call the relevant driver init function,
    48     // and register commands in PIC device extension
    49     if( impl == IMPL_PIC_SCL )
    50     {
    51         // call the implementation-specific PIC driver
    52         hal_drivers_pic_init(pic);
    53     }
    54     else if( impl == IMPL_PIC_I86 )
    55     {
    56         assert( false , __FUNCTION__ , "missing implementation for X86\n" );
    57     }
    58     else
    59     {
    60         assert( false , __FUNCTION__ , "undefined PIC device implementation" );
    61     }
    62 } // end dev_pic_init()
     47    // call the implementation-specific PIC driver
     48    hal_drivers_pic_init(pic, impl);
     49}
    6350
    6451/////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.