[RFC] Support for > 2Gib MTD
Bruce_Leonard at selinc.com
Bruce_Leonard at selinc.com
Fri Oct 3 16:36:55 EDT 2008
So I'm back to work on this. My last attempt was shot down in flames
because I changed the kernel-user space API. No worries on that. Got a
new plan. Gonna' float it out there BEFORE I put a ton of work into it
this time.
Here's a rough idea of what I'm thinking. In .../include/mtd/mtd-abi.h
add new 64 bit structs like this:
+struct erase_info_user_64 {
+ uint64_t start;
+ uint64_t length;
+}
+struct mtd_info_user_64 {
+ ...
+ uint32_t flags;
+ uint64_t size;
+ ...
+}
These new structs would be identical to the old ones execept for the types
on a few fields. To indicate that the new 64 bit interface is to be used
I would introduce a new flag for 'struct mtd_info_user_XX->flags',
something like this:
#define MTD_LARGE_SIZE 0x4000
In .../include/linux/mtd.h I would add new fields as follows:
struct erase_info {
...
u_int32 fail_addr;
+ u_int64_t addr_64;
+ u_int64_t len_64;
+ u_int64_t fail_addr_64;
u_long time;
...
}
struct mtd_info {
...
u_int32_t size;
+ u_int64_t size_64;
u_int32_t erasesize;
...
}
Plus a few new IOCTLs for getting info to/from user space if people want
to use it.
Comments?
Bruce
More information about the linux-mtd
mailing list