source: trunk/softs/tsar_boot/include/boot_ioc.h @ 476

Last change on this file since 476 was 412, checked in by porquet, 11 years ago

boot_tsar: bug fix and more debug

File size: 1.4 KB
Line 
1#ifndef BOOT_IOC_H
2#define BOOT_IOC_H
3
4#ifndef SOCLIB_IOC
5#include <sdcard.h>
6#include <spi.h>
7#else
8#include <block_device.h>
9#endif
10
11#include <defs.h>
12#include <boot_tty.h>
13#include <io.h>
14
15/**
16 * boot_ioc_read()
17 *
18 * Transfer data from a file on the block device to a memory buffer.
19 *
20 * \param lba    : first block index on the disk
21 * \param buffer : base address of the memory buffer
22 * \param count  : number of blocks to be transfered
23 *
24 * \note This is a blocking function. The function returns once the transfer
25 *       has finished
26 */
27int boot_ioc_read(unsigned int lba, void* buffer, unsigned int count);
28
29/**
30 * boot_ioc_init()
31 *
32 * Initialize the SPI controller use to access a SD card
33 */
34int boot_ioc_init();
35
36/**
37 * boot_dbuf_invalidate()
38 *
39 * Invalidate all data cache lines corresponding to a memory buffer.
40 */
41#if (CACHE_COHERENCE == 0)
42void boot_dbuf_invalidate(
43        const void * buffer,
44        unsigned int line_size,
45        unsigned int size);
46#endif
47
48/**
49 * boot_ioc_write()
50 *
51 * Transfer data from a memory buffer to a file on the block_device.
52 *
53 * \param lba    : first block index on the disk
54 * \param buffer : base address of the memory buffer
55 * \param count  : number of blocks to be transfered
56 *
57 * \note The source buffer must be in user address space.
58 */
59//int boot_ioc_write(unsigned int lba, void* buffer, unsigned int count);
60
61#endif
62
63/*
64 * vim: tabstop=4 : shiftwidth=4 : expandtab
65 */
Note: See TracBrowser for help on using the repository browser.