Changeset 216 for trunk


Ignore:
Timestamp:
Jul 17, 2017, 1:50:38 PM (7 years ago)
Author:
max@…
Message:

dispatch 'impl' in the hal

Location:
trunk
Files:
4 edited

Legend:

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

    r213 r216  
    3434void hal_drivers_pic_init(chdev_t *dev);
    3535
    36 void hal_drivers_ioc_init(chdev_t *dev);
     36void hal_drivers_ioc_init(chdev_t *dev, uint32_t impl);
    3737
    3838#endif  /* HAL_DRIVERS_H_ */
  • trunk/hal/tsar_mips32/core/hal_drivers.c

    r213 r216  
    7070/* -------------------------------------------------------------------------- */
    7171
    72 void hal_drivers_ioc_init(chdev_t *dev)
     72void hal_drivers_ioc_init(chdev_t *dev, uint32_t impl)
    7373{
    74         soclib_bdv_init(dev);
     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 {
     79                assert( false , __FUNCTION__ , "undefined IOC device implementation" );
     80        }
    7581}
    7682
  • trunk/hal/x86_64/core/hal_drivers.c

    r215 r216  
    7171/* -------------------------------------------------------------------------- */
    7272
    73 void hal_drivers_ioc_init(chdev_t *dev)
     73void hal_drivers_ioc_init(chdev_t *dev, uint32_t impl)
    7474{
    7575        ioc_ata_init(dev);
  • trunk/kernel/devices/dev_ioc.c

    r213 r216  
    2626#include <hal_gpt.h>
    2727#include <hal_drivers.h>
    28 #include <soclib_hba.h>
    2928#include <thread.h>
    3029#include <printk.h>
     
    5554
    5655    // call driver init function
    57     if( impl == IMPL_IOC_BDV )
    58     {
    59         hal_drivers_ioc_init( ioc );
    60     }
    61     else if( impl == IMPL_IOC_HBA )
    62     {
    63         soclib_hba_init( ioc );
    64     }
    65     else
    66     {
    67         assert( false , __FUNCTION__ , "undefined IOC device implementation" );
    68     }
     56    hal_drivers_ioc_init( ioc, impl );
    6957
    7058    // select a core to execute the IOC server thread
Note: See TracChangeset for help on using the changeset viewer.