aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdpart.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/mtdpart.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/mtdpart.c')
-rw-r--r--drivers/mtd/mtdpart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index c66902df3171..07c701169344 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -68,7 +68,7 @@ static int part_read (struct mtd_info *mtd, loff_t from, size_t len,
68} 68}
69 69
70static int part_point (struct mtd_info *mtd, loff_t from, size_t len, 70static int part_point (struct mtd_info *mtd, loff_t from, size_t len,
71 size_t *retlen, u_char **buf) 71 size_t *retlen, void **virt, resource_size_t *phys)
72{ 72{
73 struct mtd_part *part = PART(mtd); 73 struct mtd_part *part = PART(mtd);
74 if (from >= mtd->size) 74 if (from >= mtd->size)
@@ -76,14 +76,14 @@ static int part_point (struct mtd_info *mtd, loff_t from, size_t len,
76 else if (from + len > mtd->size) 76 else if (from + len > mtd->size)
77 len = mtd->size - from; 77 len = mtd->size - from;
78 return part->master->point (part->master, from + part->offset, 78 return part->master->point (part->master, from + part->offset,
79 len, retlen, buf); 79 len, retlen, virt, phys);
80} 80}
81 81
82static void part_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from, size_t len) 82static void part_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
83{ 83{
84 struct mtd_part *part = PART(mtd); 84 struct mtd_part *part = PART(mtd);
85 85
86 part->master->unpoint (part->master, addr, from + part->offset, len); 86 part->master->unpoint(part->master, from + part->offset, len);
87} 87}
88 88
89static int part_read_oob(struct mtd_info *mtd, loff_t from, 89static int part_read_oob(struct mtd_info *mtd, loff_t from,