diff options
author | Jared Hulbert <jaredeh@gmail.com> | 2008-04-30 02:26:49 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2008-05-01 13:59:11 -0400 |
commit | a98889f3d8882995b5aa2255b931cf0202325cc0 (patch) | |
tree | 686a1d3369143dc46c43709e0c40b2cc8ef619d7 /include/linux | |
parent | 27c72b040c0be8f3704ed0b6b84c12cbba24a7e8 (diff) |
[MTD][NOR] Add physical address to point() method
Adding the ability to get a physical address from point() in addition
to virtual address. This physical address is required for XIP of
userspace code from flash.
Signed-off-by: Jared Hulbert <jaredeh@gmail.com>
Reviewed-by: Jörn Engel <joern@logfs.org>
Acked-by: Nicolas Pitre <nico@cam.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mtd/mtd.h | 6 | ||||
-rw-r--r-- | include/linux/mtd/pmc551.h | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 0a13bb35f044..245f9098e171 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -143,10 +143,12 @@ struct mtd_info { | |||
143 | int (*erase) (struct mtd_info *mtd, struct erase_info *instr); | 143 | int (*erase) (struct mtd_info *mtd, struct erase_info *instr); |
144 | 144 | ||
145 | /* This stuff for eXecute-In-Place */ | 145 | /* This stuff for eXecute-In-Place */ |
146 | int (*point) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf); | 146 | /* phys is optional and may be set to NULL */ |
147 | int (*point) (struct mtd_info *mtd, loff_t from, size_t len, | ||
148 | size_t *retlen, void **virt, resource_size_t *phys); | ||
147 | 149 | ||
148 | /* We probably shouldn't allow XIP if the unpoint isn't a NULL */ | 150 | /* We probably shouldn't allow XIP if the unpoint isn't a NULL */ |
149 | void (*unpoint) (struct mtd_info *mtd, u_char * addr, loff_t from, size_t len); | 151 | void (*unpoint) (struct mtd_info *mtd, loff_t from, size_t len); |
150 | 152 | ||
151 | 153 | ||
152 | int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); | 154 | int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf); |
diff --git a/include/linux/mtd/pmc551.h b/include/linux/mtd/pmc551.h index a7f6d20ad407..5cc070c24d88 100644 --- a/include/linux/mtd/pmc551.h +++ b/include/linux/mtd/pmc551.h | |||
@@ -36,8 +36,9 @@ struct mypriv { | |||
36 | * Function Prototypes | 36 | * Function Prototypes |
37 | */ | 37 | */ |
38 | static int pmc551_erase(struct mtd_info *, struct erase_info *); | 38 | static int pmc551_erase(struct mtd_info *, struct erase_info *); |
39 | static void pmc551_unpoint(struct mtd_info *, u_char *, loff_t, size_t); | 39 | static void pmc551_unpoint(struct mtd_info *, loff_t, size_t); |
40 | static int pmc551_point (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf); | 40 | static int pmc551_point(struct mtd_info *mtd, loff_t from, size_t len, |
41 | size_t *retlen, void **virt, resource_size_t *phys); | ||
41 | static int pmc551_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *); | 42 | static int pmc551_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *); |
42 | static int pmc551_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); | 43 | static int pmc551_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *); |
43 | 44 | ||