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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [linux/] [flash.h] - Blame information for rev 1633

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/* $Id: flash.h,v 1.1 2005-12-20 11:32:23 jcastillo Exp $ */
2
 
3
#ifndef __LINUX_FLASH_H
4
#define __LINUX_FLASH_H
5
 
6
#include <asm/types.h>
7
 
8
/* the ioctl's supported */
9
 
10
#define FLASHIO_ERASEALL 0x1      /* erase the entire device, blocks until completion */
11
 
12
#ifdef __KERNEL__
13
extern void flash_safe_acquire(void *part);
14
extern void flash_safe_release(void *part);
15
extern int flash_safe_read(void *part, unsigned char *fptr,
16
                           unsigned char *buf, int count);
17
extern int flash_safe_write(void *part, unsigned char *fptr,
18
                            const unsigned char *buf, int count);
19
extern void *flash_getpart(kdev_t dev);
20
extern unsigned char *flash_get_direct_pointer(kdev_t dev, __u32 offset);
21
extern int flash_erase_region(kdev_t dev, __u32 offset, __u32 size);
22
extern long flash_erasable_size(void *_part, __u32 offset, __u32 size);
23
extern int flash_memset(unsigned char *ptr, const __u8 c, unsigned long size);
24
#endif
25
 
26
/* the following are on-flash structures */
27
 
28
#define FLASH_BOOT_MAGIC 0xbeefcace
29
 
30
struct bootblock {
31
        __u32 magic;
32
        __u32 hwid;
33
        unsigned char sernbr[8]; /* uses only 0-5, but is 8 big for alignment */
34
        char brandname[32];
35
        __u32 ptable_offset;       /* offset into bootblock where the partitiontable is */
36
        /* ... */
37
};
38
 
39
/* the partitiontable consists of structs like these, after each other */
40
 
41
struct partitiontable {
42
        __u32 offset;
43
        __u32 size;
44
        __u32 flags;
45
};
46
 
47
#endif /* __LINUX_FLASH_H */

powered by: WebSVN 2.1.0

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