Ignore:
Timestamp:
Oct 5, 2018, 12:08:35 AM (6 years ago)
Author:
alain
Message:

Introduction of the soclib_mty driver for the TSAR-LETI architecture.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/drivers/soclib_mmc.c

    r451 r570  
    2727#include <dev_mmc.h>
    2828#include <soclib_mmc.h>
    29 #include <spinlock.h>
    3029#include <thread.h>
    3130#include <printk.h>
     
    6261
    6362    // get command type and extended pointer on MMC device
    64     type   =         hal_remote_lw ( XPTR( th_cxy , &th_ptr->mmc_cmd.type   ) );
    65     dev_xp = (xptr_t)hal_remote_lwd( XPTR( th_cxy , &th_ptr->mmc_cmd.dev_xp ) );
     63    type   =         hal_remote_l32 ( XPTR( th_cxy , &th_ptr->mmc_cmd.type   ) );
     64    dev_xp = (xptr_t)hal_remote_l64( XPTR( th_cxy , &th_ptr->mmc_cmd.dev_xp ) );
    6665
    6766    // get MMC device cluster and local pointer
     
    7069
    7170    // get cluster and pointers for SOCLIB_MMC peripheral segment base
    72     xptr_t     seg_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) );
     71    xptr_t     seg_xp = (xptr_t)hal_remote_l64( XPTR( dev_cxy , &dev_ptr->base ) );
    7372    cxy_t      seg_cxy = GET_CXY( seg_xp );
    7473    uint32_t * seg_ptr = GET_PTR( seg_xp );
     
    7877        // get buffer pointer and size
    7978        buf_ptr  = hal_remote_lpt( XPTR( th_cxy , &th_ptr->mmc_cmd.buf_ptr ) );
    80         buf_size = hal_remote_lw ( XPTR( th_cxy , &th_ptr->mmc_cmd.buf_size ) );
     79        buf_size = hal_remote_l32 ( XPTR( th_cxy , &th_ptr->mmc_cmd.buf_size ) );
    8180
    8281        // set command type
     
    8685
    8786        // set SOCLIB_MMC registers to start INVAL/SYNC operation
    88         hal_remote_sw( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_ADDR_LO    ) , (uint32_t)buf_ptr );
    89         hal_remote_sw( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_ADDR_HI    ) , (uint32_t)dev_cxy );
    90         hal_remote_sw( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_BUF_LENGTH ) , buf_size );
    91         hal_remote_sw( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_CMD_TYPE   ) , cc_cmd );
     87        hal_remote_s32( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_ADDR_LO    ) , (uint32_t)buf_ptr );
     88        hal_remote_s32( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_ADDR_HI    ) , (uint32_t)dev_cxy );
     89        hal_remote_s32( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_BUF_LENGTH ) , buf_size );
     90        hal_remote_s32( XPTR( seg_cxy , seg_ptr + SOCLIB_MMC_CMD_TYPE   ) , cc_cmd );
    9291    }
    9392    else  // (type == MMC_GET_ERROR) or (type == MMC_GET_ERROR) pr (type == MMC_GET_INSTRU )
     
    9594        // get src/dst buffer local pointer and register index
    9695        reg_ptr   = (uint32_t *)hal_remote_lpt( XPTR( th_cxy , &th_ptr->mmc_cmd.reg_ptr ) );
    97         reg_index = hal_remote_lw( XPTR( th_cxy , &th_ptr->mmc_cmd.reg_index ) );
     96        reg_index = hal_remote_l32( XPTR( th_cxy , &th_ptr->mmc_cmd.reg_index ) );
    9897
    9998        // move register to/from local buffer
    10099        if( (type == MMC_GET_ERROR) || (type == MMC_GET_INSTRU) )
    101100        {
    102             *reg_ptr =  hal_remote_lw( XPTR( seg_cxy , seg_ptr + reg_index ) );
     101            *reg_ptr =  hal_remote_l32( XPTR( seg_cxy , seg_ptr + reg_index ) );
    103102        }
    104103        else  // type == MMC_SET_ERROR
    105104        {
    106             hal_remote_sw( XPTR( seg_cxy , seg_ptr + reg_index ) , *reg_ptr );
     105            hal_remote_s32( XPTR( seg_cxy , seg_ptr + reg_index ) , *reg_ptr );
    107106        }
    108107    }
Note: See TracChangeset for help on using the changeset viewer.