Changeset 992


Ignore:
Timestamp:
May 14, 2015, 10:45:44 PM (9 years ago)
Author:
alain
Message:

Introduce a new driver for SD Card using the 4bits wide SD bus.
THere is now 5 supported block device peripherals, and the driver names
have been re-organised: reset_ioc_xxx with xxx in (bdv, hba, rdk, spi, sdc)

Location:
trunk/softs/tsar_boot
Files:
10 added
10 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/tsar_boot/Makefile

    r962 r992  
    22-include ./build.mk
    33
    4 USE_DT     ?= 1
    5 DTS        ?= platform.dts
    6 
    7 MAKECMDGOALS ?= none
     4USE_DT           ?= 0
     5DTS              ?= platform.dts
     6HARD_CONFIG_PATH ?= ../../../giet_vm
     7MAKECMDGOALS     ?= none
    88
    99ifneq ($(MAKECMDGOALS),$(filter $(MAKECMDGOALS),clean distclean clean-doc doc))
     
    7878DRV_SRCS   := reset_tty.c        \
    7979              reset_inval.c      \
    80               reset_sdc.c        \
    81               reset_bdv.c        \
    82               reset_rdk.c        \
    83               reset_hba.c        \
    84               sdcard.c           \
     80              reset_ioc_spi.c    \
     81              reset_ioc_bdv.c    \
     82              reset_ioc_rdk.c    \
     83              reset_ioc_hba.c    \
     84              reset_ioc_sdc.c    \
    8585              spi.c
    8686
  • trunk/softs/tsar_boot/drivers/reset_tty.c

    r758 r992  
    105105
    106106    reset_puts("\n!!! Exit Processor ");
    107     reset_putx(pid);
     107    reset_putx(pid & 0x3FF);
    108108    reset_puts(" !!!\n");
    109109
  • trunk/softs/tsar_boot/include/reset_ioc.h

    r962 r992  
    99 *         on the USE_IOC_BDV, USE_IOC_SDC or USE_IOC_HBA USE_IOC_RDK flags
    1010 */
     11
    1112#ifndef RESET_IOC_H
    1213#define RESET_IOC_H
  • trunk/softs/tsar_boot/src/reset_elf_loader.c

    r962 r992  
    4444    }
    4545
    46 #if (RESET_DEBUG == 1)
     46#if (RESET_DEBUG > 1)
    4747    reset_display_block( (char*)&elf_header );
    4848#endif
     
    6868
    6969#if (RESET_DEBUG == 1)
    70         reset_puts("[RESET DEBUG] Loadable segment found:\n");
     70        reset_puts("\n[RESET DEBUG] Loadable segment found:\n");
    7171        reset_print_elf_phdr(&elf_pht[pseg]);
    7272#endif
  • trunk/softs/tsar_boot/src/reset_ioc.c

    r962 r992  
    66 * \brief  API for accessing the disk controller
    77 *
    8  * \note   These functions call the specific disk controller driver depending
    9  *         on the USE_IOC_BDV, USE_IOC_SDC or USE_IOC_RDK constants
     8 * \note   These functions call the specific disk controller driver depending on
     9 *          USE_IOC_BDV / USE_IOC_SDC / USE_IOC_RDK / USE_IOC_SDC / USE_IOC_SPI
    1010 */
    1111
     
    1313#include <defs.h>
    1414
    15 #if (USE_IOC_BDV + USE_IOC_SDC + USE_IOC_RDK + USE_IOC_HBA) != 1
     15#if (USE_IOC_BDV + USE_IOC_SDC + USE_IOC_RDK + USE_IOC_HBA + USE_IOC_SPI) != 1
    1616#   error "in reset_ioc.c : undefined disk controller in hard_config.h"
    1717#endif
    1818
    1919#if USE_IOC_SDC
    20 #include <reset_sdc.h>
     20#include <reset_ioc_sdc.h>
    2121#endif
    2222
    2323#if USE_IOC_BDV
    24 #include <reset_bdv.h>
     24#include <reset_ioc_bdv.h>
    2525#endif
    2626
    2727#if USE_IOC_RDK
    28 #include <reset_rdk.h>
     28#include <reset_ioc_rdk.h>
    2929#endif
    3030
    3131#if USE_IOC_HBA
    32 #include <reset_hba.h>
     32#include <reset_ioc_hba.h>
     33#endif
     34
     35#if USE_IOC_SPI
     36#include <reset_ioc_spi.h>
    3337#endif
    3438
     
    4751#elif USE_IOC_HBA
    4852    return reset_hba_init();
     53#elif USE_IOC_SPI
     54    return reset_spi_init();
    4955#else
    5056#   error "in reset_ioc_init.c : undefined disk controller in hard_config.h"
     
    7278#elif USE_IOC_HBA
    7379    return reset_hba_read(lba, buffer, count);
     80#elif USE_IOC_SPI
     81    return reset_spi_read(lba, buffer, count);
    7482#else
    7583#   error "in reset_ioc_read.c : undefined disk controller in hard_config.h"
  • trunk/softs/tsar_boot/src/reset_utils.c

    r962 r992  
    231231    unsigned int word;
    232232
    233     reset_puts("***********************************************************************\n");
     233    reset_puts("\n***********************************************************************\n");
    234234    for ( line = 0 ; line < 32 ; line++ )
    235235    {
     
    241241        for ( word=0 ; word<4 ; word++ )
    242242        {
    243             unsigned int byte  = (line<<5) + (word<<2);
     243            unsigned int byte  = (line<<4) + (word<<2);
    244244            unsigned int hexa  = (buffer[byte  ]<<24) |
    245245                                 (buffer[byte+1]<<16) |
Note: See TracChangeset for help on using the changeset viewer.