diff options
author | Jared Hulbert <jaredeh@gmail.com> | 2008-04-29 23:26:49 -0700 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2008-05-01 18:59:11 +0100 |
commit | a98889f3d8882995b5aa2255b931cf0202325cc0 (patch) | |
tree | 686a1d3369143dc46c43709e0c40b2cc8ef619d7 /drivers/mtd/devices/mtdram.c | |
parent | 27c72b040c0be8f3704ed0b6b84c12cbba24a7e8 (diff) | |
download | kernel-crypto-a98889f3d8882995b5aa2255b931cf0202325cc0.tar.gz kernel-crypto-a98889f3d8882995b5aa2255b931cf0202325cc0.tar.xz kernel-crypto-a98889f3d8882995b5aa2255b931cf0202325cc0.zip |
[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 'drivers/mtd/devices/mtdram.c')
-rw-r--r-- | drivers/mtd/devices/mtdram.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c index bf485ff4945..0399be17862 100644 --- a/drivers/mtd/devices/mtdram.c +++ b/drivers/mtd/devices/mtdram.c @@ -48,18 +48,21 @@ static int ram_erase(struct mtd_info *mtd, struct erase_info *instr) } static int ram_point(struct mtd_info *mtd, loff_t from, size_t len, - size_t *retlen, u_char **mtdbuf) + size_t *retlen, void **virt, resource_size_t *phys) { if (from + len > mtd->size) return -EINVAL; - *mtdbuf = mtd->priv + from; + /* can we return a physical address with this driver? */ + if (phys) + return -EINVAL; + + *virt = mtd->priv + from; *retlen = len; return 0; } -static void ram_unpoint(struct mtd_info *mtd, u_char * addr, loff_t from, - size_t len) +static void ram_unpoint(struct mtd_info *mtd, loff_t from, size_t len) { } |