Last change
on this file since 1033 was
992,
checked in by alain, 9 years ago
|
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)
|
File size:
646 bytes
|
Line | |
---|
1 | /** |
---|
2 | * \file reset_ioc_rdk.c |
---|
3 | * \date December 14, 2014 |
---|
4 | * \author Cesar Fuguet |
---|
5 | */ |
---|
6 | |
---|
7 | #include <reset_ioc_rdk.h> |
---|
8 | #include <reset_utils.h> |
---|
9 | #include <defs.h> |
---|
10 | |
---|
11 | #ifndef SEG_RDK_BASE |
---|
12 | # error "SEG_RDK_BASE constant must be defined in the hard_config.h file" |
---|
13 | #endif |
---|
14 | |
---|
15 | static int* const rdk_address = (int* const)SEG_RDK_BASE; |
---|
16 | |
---|
17 | int reset_rdk_init() |
---|
18 | { |
---|
19 | return 0; |
---|
20 | } |
---|
21 | |
---|
22 | int reset_rdk_read( unsigned int lba, void* buffer, unsigned int count ) |
---|
23 | { |
---|
24 | char* const src = (char* const)rdk_address + (lba * BLOCK_SIZE); |
---|
25 | memcpy(buffer, (void*)src, count * BLOCK_SIZE); |
---|
26 | return 0; |
---|
27 | } |
---|
28 | |
---|
29 | /* |
---|
30 | * vim: tabstop=4 : softtabstop=4 : shiftwidth=4 : expandtab |
---|
31 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.