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/maps/uclinux.c | |
parent | 27c72b040c0be8f3704ed0b6b84c12cbba24a7e8 (diff) | |
download | linux-a98889f3d8882995b5aa2255b931cf0202325cc0.tar.gz linux-a98889f3d8882995b5aa2255b931cf0202325cc0.tar.bz2 linux-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/maps/uclinux.c')
-rw-r--r-- | drivers/mtd/maps/uclinux.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c index 14ffb1a9302a..c42f4b83f686 100644 --- a/drivers/mtd/maps/uclinux.c +++ b/drivers/mtd/maps/uclinux.c @@ -40,10 +40,12 @@ struct mtd_partition uclinux_romfs[] = { /****************************************************************************/ int uclinux_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) { struct map_info *map = mtd->priv; - *mtdbuf = (u_char *) (map->virt + ((int) from)); + *virt = map->virt + from; + if (phys) + *phys = map->phys + from; *retlen = len; return(0); } |