aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/uclinux.c
diff options
context:
space:
mode:
authorJared Hulbert <jaredeh@gmail.com>2008-04-30 02:26:49 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2008-05-01 13:59:11 -0400
commita98889f3d8882995b5aa2255b931cf0202325cc0 (patch)
tree686a1d3369143dc46c43709e0c40b2cc8ef619d7 /drivers/mtd/maps/uclinux.c
parent27c72b040c0be8f3704ed0b6b84c12cbba24a7e8 (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 'drivers/mtd/maps/uclinux.c')
-rw-r--r--drivers/mtd/maps/uclinux.c6
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[] = {
40/****************************************************************************/ 40/****************************************************************************/
41 41
42int uclinux_point(struct mtd_info *mtd, loff_t from, size_t len, 42int uclinux_point(struct mtd_info *mtd, loff_t from, size_t len,
43 size_t *retlen, u_char **mtdbuf) 43 size_t *retlen, void **virt, resource_size_t *phys)
44{ 44{
45 struct map_info *map = mtd->priv; 45 struct map_info *map = mtd->priv;
46 *mtdbuf = (u_char *) (map->virt + ((int) from)); 46 *virt = map->virt + from;
47 if (phys)
48 *phys = map->phys + from;
47 *retlen = len; 49 *retlen = len;
48 return(0); 50 return(0);
49} 51}