OpenCores
URL https://opencores.org/ocsvn/igor/igor/trunk

Subversion Repositories igor

[/] [igor/] [trunk/] [avr/] [eth-test/] [dev/] [boot.c] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 atypic
#include <device.h>
2
 
3
static igordev_init_fn_t boot_init;
4
static igordev_read_fn_t boot_read;
5
static igordev_write_fn_t boot_write;
6
static igordev_flush_fn_t boot_flush;
7
extern struct igordev igordev_mmc;
8
 
9
struct igordev igordev_boot = {
10
        .init = boot_init,
11
        .read = boot_read,
12
        .write = boot_write,
13
        .flush = boot_flush
14
};
15
 
16
/* We want to be loaded later on. */
17
void
18
boot_init(void)
19
{
20
        igordev_boot.id = (CAN_READ | ADDR_READ | ADDR_WRITE | (DEVTYPE_BOOT <<
21
            DEVTYPE_OFFSET));
22
        igordev_boot.read_status = igordev_boot.write_status = IDEV_STATUS_OK;
23
}
24
 
25
/* Read data from boot program. */
26
uint8_t
27
boot_read(uint64_t addr, uint8_t *data, uint8_t numbytes)
28
{
29
 
30
        return (igordev_mmc.read(addr, data, numbytes));
31
}
32
 
33
/* We don't allow writing to this part. */
34
uint8_t
35
boot_write(uint64_t addr, uint8_t *data, uint8_t numbytes)
36
{
37
        return (0);
38
}
39
 
40
void
41
boot_flush(void) {}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.