Changeset 257 for trunk


Ignore:
Timestamp:
Jul 20, 2017, 2:59:04 PM (7 years ago)
Author:
max@…
Message:

Hide soclib_mmc.

Location:
trunk
Files:
5 edited

Legend:

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

    r252 r257  
    3131void hal_drivers_ioc_init(chdev_t *ioc, uint32_t impl);
    3232
     33void hal_drivers_mmc_init(chdev_t *mmc, uint32_t impl);
     34
    3335#endif  /* HAL_DRIVERS_H_ */
    3436
  • trunk/hal/tsar_mips32/core/hal_drivers.c

    r252 r257  
    9494}
    9595
     96///////////////////////////////////////////////////////////////////////////////
     97//    MMC
     98///////////////////////////////////////////////////////////////////////////////
     99
     100//////////////////////////////////////////
     101void hal_drivers_mmc_init( chdev_t  * mmc,
     102                           uint32_t   impl )
     103{
     104    if( impl == IMPL_MMC_TSR )
     105    {
     106        soclib_mmc_init( mmc );
     107    }
     108    else
     109    {
     110        assert( false , __FUNCTION__ , "undefined MMC device implementation" );
     111    }
     112}
     113
  • trunk/hal/tsar_mips32/drivers/soclib_mmc.c

    r75 r257  
    3737    // get pointer on MMC segment base
    3838    uint32_t * base = (uint32_t *)GET_PTR( chdev->base );
     39
     40    // set driver specific fields in device descriptor
     41    chdev->cmd = &soclib_mmc_cmd;
     42    chdev->isr = &soclib_mmc_isr;
    3943
    4044    // enable MMC IRQ
  • trunk/hal/x86_64/core/hal_drivers.c

    r254 r257  
    6464}
    6565
     66/* -------------------------------------------------------------------------- */
     67
     68void hal_drivers_mmc_init(chdev_t *mmc, uint32_t impl)
     69{
     70        x86_panic("MMC driver not implemented");
     71}
     72
  • trunk/kernel/devices/dev_mmc.c

    r238 r257  
    2424#include <hal_types.h>
    2525#include <hal_special.h>
    26 #include <soclib_mmc.h>
     26#include <hal_drivers.h>
    2727#include <printk.h>
    2828#include <chdev.h>
     
    4545    snprintf( mmc->name , 16 , "mmc_%x" , local_cxy );
    4646
    47     // set driver specific fields in device descriptor and call driver init function
    48     if( impl == IMPL_MMC_TSR )
    49     {
    50         mmc->cmd = &soclib_mmc_cmd;
    51         mmc->isr = &soclib_mmc_isr;
    52         soclib_mmc_init( mmc );
    53     }
    54     else
    55     {
    56         assert( false , __FUNCTION__ , "undefined MMC device implementation" );
    57     }
     47    // call driver init function
     48    hal_drivers_mmc_init( mmc , impl );
    5849
    5950    // bind IRQ to CP0
Note: See TracChangeset for help on using the changeset viewer.