Ignore:
Timestamp:
Feb 4, 2014, 2:16:37 AM (11 years ago)
Author:
cfuguet
Message:

Modifications on GIET-VM IOC driver:

  • Introducing new layer on the IOC driver. Every call to ioc_read, ioc_write, ioc_get_block_size or ioc_init

functions will call the specific driver of the used IOC
controller. Supported IOC controllers are (for now) :

  1. BDV (Soclib Block Device)
  2. HBA
  3. SPI (SDCARD - SPI controller)
  • All functions of IOC controllers drivers respect the same interface.
  • To specify the used IOC controller of the platform, a subtype field has been introduced on the map.xml file. This subtype field must be declared on the IOC periph instantiation. Available subtypes (for now) : BDV, HBA or SPI.
File:
1 copied

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_common/io.h

    r288 r289  
    1 /**
    2  * \file        io.h
    3  * \date        5 September 2012
    4  * \author      Cesar Fuguet
    5  *
    6  * Utility functions to write or read memory mapped hardware registers
    7  */
     1///////////////////////////////////////////////////////////////////////////////////
     2// File     : io.h
     3// Date     : 05/09/2012
     4// Author   : cesar fuguet
     5// Copyright (c) UPMC-LIP6
     6///////////////////////////////////////////////////////////////////////////////////
     7// Utility functions to write or read memory mapped hardware registers
     8///////////////////////////////////////////////////////////////////////////////////
    89#ifndef IO_H
    910#define IO_H
    1011
    11 /**
    12  * Read an 32 bits memory mapped hardware register
    13  */
     12///////////////////////////////////////////////////////////////////////////////////
     13// Read an 32 bits memory mapped hardware register
     14///////////////////////////////////////////////////////////////////////////////////
    1415static inline unsigned int ioread32(void * addr)
    1516{
     
    1718}
    1819
    19 /**
    20  * Read an 16 bits memory mapped hardware register
    21  */
     20///////////////////////////////////////////////////////////////////////////////////
     21// Read an 16 bits memory mapped hardware register
     22///////////////////////////////////////////////////////////////////////////////////
    2223static inline unsigned short ioread16(void * addr)
    2324{
     
    2526}
    2627
    27 /**
    28  * Read an 8 bits memory mapped hardware register
    29  */
     28///////////////////////////////////////////////////////////////////////////////////
     29// Read an 8 bits memory mapped hardware register
     30///////////////////////////////////////////////////////////////////////////////////
    3031static inline unsigned char ioread8(void * addr)
    3132{
     
    3334}
    3435
    35 /**
    36  * Write an 32 bits memory mapped hardware register
    37  */
     36///////////////////////////////////////////////////////////////////////////////////
     37// Write an 32 bits memory mapped hardware register
     38///////////////////////////////////////////////////////////////////////////////////
    3839static inline void iowrite32(void * addr, unsigned int value)
    3940{
     
    4243}
    4344
    44 /**
    45  * Write an 16 bits memory mapped hardware register
    46  */
     45///////////////////////////////////////////////////////////////////////////////////
     46// Write an 16 bits memory mapped hardware register
     47///////////////////////////////////////////////////////////////////////////////////
    4748static inline void iowrite16(void * addr, unsigned short value)
    4849{
     
    5152}
    5253
    53 /**
    54  * Write an 8 bits memory mapped hardware register
    55  */
     54///////////////////////////////////////////////////////////////////////////////////
     55// Write an 8 bits memory mapped hardware register
     56///////////////////////////////////////////////////////////////////////////////////
    5657static inline void iowrite8(void * addr, unsigned char value)
    5758{
Note: See TracChangeset for help on using the changeset viewer.